Just wondering if it's possible really. I have a large website, with hundreds of JS and HTML files.
Is it possible to compile these down into a single DLL, so when deployed to customers web servers they don't see or have access to the code?
Just wondering if it's possible really. I have a large website, with hundreds of JS and HTML files.
Is it possible to compile these down into a single DLL, so when deployed to customers web servers they don't see or have access to the code?
I have never tried, but theoretically it is possible to achieve that.
HTML - compile (I assume you use *.cshtml)
Set <MvcBuildViews>true</MvcBuildViews>
in the <PropertyGroup>
element of your .csproj file.
JS, you will have to ember js files as resources, use ScriptManager
to load it
CSS - hack it, with same methods as js, but using Add CSS File in DLL (Class Library)
Even if you minify, obfuscate, compile and ship it as dll, I will be able to see html/css/js with developer tools. And honestly none of it make sense, horrible debugging, no caching.
you actually can,
ember your js and css files (view remigijus answer). When you publish, in the configure part of the settings tab (see capture below), be sure to uncheck "allow precompiled site to be updatable" <--- will compile the cshtml "chose merge page and control in a single assembly"
but i raise the same warnings than your other answers, it's useless and counterproductive. Keep in mind that anyone can decompile a .net assembly anyway