什么是更好的方法来保护商业.NET软件被随便复制? [英] What are the better ways to protect commercial .NET software from being casually copied?

查看:217
本文介绍了什么是更好的方法来保护商业.NET软件被随便复制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

包的主要焦点是开发工具,但也有一组分(a DLL),它的一些少数开发商想重新分配与自己的应用。这是管理的.NET 3.5下code运行。

The main focus of the package is developer tools but there is also one component (a DLL) that some small number of developers would like to redistribute with their own application. This is managed code running under .NET 3.5.

推荐答案

从重用库中阻止其他人最简单的方法是,以纪念所有类内部和标记库程序集的<一个href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx"相对=nofollow> InternalsVisibleTo自定义属性。这可以明确列举哪些程序集(在你的情况下,您的每一个开发者工具)可以调用内部方法。所有其他组件(如那些客户可能会写)将被拒绝访问。

The easiest way to discourage others from reusing your library is to mark all classes "internal" and mark the library assembly with the InternalsVisibleTo custom attribute. That allows you to specifically enumerate which assemblies (in your case each of your developer tools) can call internal methods. All other assemblies (such as ones customers may write) will be denied access.

如果用户确定足够的,虽然,他们可以使用其他技术,如反射或反向工程IL重用你的图书馆。但是,这种技术$ P $直接使用你的库pvents他们。

If the customer is determined enough though, they can use other techniques like reflection or reverse engineering the IL to reuse your library. But this technique prevents them from directly using your library.

这篇关于什么是更好的方法来保护商业.NET软件被随便复制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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