Obfuscating ASP.Net dll breaks web application.

Posted by uriDium on Stack Overflow See other posts from Stack Overflow or by uriDium
Published on 2010-03-31T18:13:32Z Indexed on 2010/03/31 19:03 UTC
Read the original article Hit count: 276

Filed under:
|

I wouldn't usually bother to obfuscate a web application DLL but right now I have to share some server space with someone who might have a conflict of interest and might be tempted to steal the deal and decompile it. Not an ideal solution I know but hey.

So I am using VS 2005, a web deployment project (which compiles into a single DLL) and Dotfuscator community edition. When I obfuscate the DLL the web application breaks and I get some message like

Could not load type 'Browse' from assembly MyAssembly

So I searched around and found that if I disable renaming then it should fix it. Which it does. But now when I look at the DLL using .Net reflector I can see everything again. So this seems kind of pointless.

Is there a way to get this to work? Is there a better way to protect my DLL from someone I have to share a server with?

UPDATE:

I figured out my problem. All the classnames have changed but now all my <%@ Page Language="C#" AutoEventWireup="true" CodeFile="mycode.aspx.cs" Inherits="mycode" %>

is incorrect because mycode no longer exists. It is now aef or something. Is there any tool out there that will also change the names of the Codefile and Inherits tags?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about obfuscation