views:

699

answers:

4

Hi, Is it possible to obfuscate a .NET web application? I tried to use the Dotofuscator tool that comes with Visual Studio 2005 and I was able to obfuscate the dlls of a precompiled web site, but when I deployed the soultion to an IIS server, I could not the pages of the application.

So the question would be: was any of you able to obfuscate a complete .NET web application?

Thanks for your answers

EDIT: I obfuscated all the dlls on the bin folder. The site is built without allowing updates of the aspx files. After that when I go to http://serveradress/main.aspx, I get an error saying that main.aspx does not exists

PD: I need to obfuscate the code because the application does some license chcecking and I want to make it harder to remove the license checking code

+1  A: 

Just bear in mind that is you obfuscate an application that uses reflection, it can cause issues.

I personally don't see the need to obfuscate, as people who really want to see your code, will get their hands on it with effort, regardless if you obfuscate it or not.

Galwegian
But making it just a little harder will prevent 95% of the people who go in to peek or steal something, and that's better than letting anybody get their hand in your cookie jar!
TravisO
I don't think obfuscation really makes it that much harder. It's like reading code with really bad names. The only benefit i see is string encryption. Now you have to do some foot work to decrypt them.
Aaron Fischer
You ever use reflection on an application with hundreds of classes all named with unprintable characters? That tends to make things a little more difficult reflect reflector and have a look.
JoshBerke
A: 

Make sure you use the library setting with your obfuscation software. If you don't all your classes and methods will be renamed.

Aaron Fischer
A: 

Actually, you can. You obfuscate the dll. Thing is, you must exclude from renaming a lot of classes, the ones inheriting System.Web.UI.Page, UserControl, and you also must exclude HttpAplicattion. Some obfuscators like BitHelmet Obfuscator (http://www.bithelmet.com) and DeepSea (http://www.deepseaobfuscator.com) provides "smart exclusions" so you do not have to manually do it.

Daniel Dolz
A: 

If you can find the obfuscated name of your codebehind class of aspx files then you can set the inherits attributes with that new namespace and class names. You can use Reflector and just quess via declarations of the methods or there may be an output old_name - obfuscated_name list with your obfuscation program.

Emre Güldoğan