How to package an ASP.NET application to prevent customers from modifying it?

StackOverflow https://stackoverflow.com/questions/1216897

  •  06-07-2019
  •  | 
  •  

Question

Is there a tool or some general approach to packaging all the files of an ASP.NET application into binary form to prevent modification once its deployed? I am thinking there would be a set of signed binaries and a config file for settings that we allow the customer to modify. Has anyone attempted this, is it even possible?

I would pay a reasonable amount for a slick commercial product that did this with minimal hassle.

UPDATE

Sorry, from the answers I can see that I wasn't clear. I meant literally packaging ALL files, not just the code files. This means aspx, scripts, images etc. I'm not trying to prevent reverse engineering... this is a supportability issue, i.e. to avoid dealing with problems brought about by customer messing with the files.

No correct solution

OTHER TIPS

If you made a web application project than you can compile your code into a single dll file. You can find it in the bin folder.

Just use aspnet_compiler.exe to precomple everything and then use aspnet_merge.exe to roll up all of the compiled assemblies into a single assembly. You can use an obfuscation tool like DotFuscator if you want to make it more difficult to reverse-engineer. Visual Studio pro and up include a "lite" edition of Dotfuscator that you can use for this.

Your codebehind files will be compiled in a single dll as ZippyV already mentioned. The aspx files will get deployed normally on the webserver.

But still, your dll files can be disassembled quite easily. So to be sure you have to use an obfuscator.

If you mean ALL files including the aspx you could also consider ngen. It precompiles everything into a dll so you can't even get at the aspx pages.

Although, ngen was designed to get rid of the JIT compiling feature of the framework and is definitely not a generally recommended approach but it may work in your case well.

From VS2008 select the menu option "Tools" and then "Dotfuscator Community Edition". You will have a "Learn More" link after it starts up.

I also sign mine using SN.exe to make it have a strong name. Given all this, I think it is complicated enough to figure out a system if you are given the source code and help.... so I don't worry about it anymore.

maybe Dotfuscator your customer won't be able to modify it nor reverse-engineer it :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top