混淆ASP.Net DLL打破Web应用程序 [英] Obfuscating ASP.Net dll breaks web application

查看:182
本文介绍了混淆ASP.Net DLL打破Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常不会刻意去模糊Web应用程序的DLL,但现在我必须分享与别人谁可能有利益冲突,并可能会尝试窃取交易和反编译它的一些服务器空间。不是一个理想的解决方案,但我知道哎。

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.

所以我使用VS 2005,网络部署项目(编译成一个DLL)和Dotfuscator社区版。当我混淆DLL Web应用程序断裂和我得到这样

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

所以,我周围搜查,发现如果我停用,然后重新命名它应该修复它。其中它。但现在,当我使用.net反射看我的DLL可以再次看到的一切。因此,这似乎是一种毫无意义的。

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.

有没有办法得到这个工作?
有没有保护我的DLL从别人更好的办法我必须分享一台服务器?

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?

更新:

我想通了,我的问题。所有的类名已经改变,但现在我所有的

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" %>

不正确,因为我的code不复存在。现在是AEF什么的。是否有任何工具,在那里,也将改变$ C $的CFile的名字和继承的标签?

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?

推荐答案

您已接近该解决方案。
在你的情况我不知道在这种情况下'浏览'被使用,但你的地方引用它作为一个字符串?

You're close to the solution. In your situation I don't know in which context 'Browse' is used, but are you referencing it somewhere as a string?

有一些东西它只是当你以某种方式无法利用它进行模糊处理。

There are some things which simply can't be obfuscated when you're using it in a certain way.

例如,当你有这势必会控制自定义对象。您已指定为valuemember的那些的DisplayMember属性不能进行模糊处理。
这是因为在属性被定义为字符串。所以在设计时有控制和实际性能之间没有连接,但在运行时出现。
我不知道如何更好地解释;但这里的一些code:

For example, when you have custom objects which is bound to a control. Those properties which you've specified as a displaymember of valuemember cannot be obfuscated. This is because the properties are defined as a string. So at designtime there's no connection between the control and the actual property, but at runtime there is. I don't know how to explain it better; but here's some code:

// custom object
Public Class MyObject
{
    string Test() { get; set; }
}

// here the object is bound to a combobox

MyCombo.ValueMember = "Test";  // The Test property cannot be obfuscated because of this 'indirect' reference.
MyCombo.DisplayMember = "Test";
MyCombo.DataSource = lstListOfMyObjects;

希望它解决您的问题。如果没有,让我知道。

Hopefully it addresses your problem. If not, let me know.

这篇关于混淆ASP.Net DLL打破Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆