处理 .NET 应用程序许可的最简单方法是什么?

发布于 2024-10-15 04:15:19 字数 132 浏览 1 评论 0原文

我即将交付我的自由 Windows 窗体项目。

处理许可的最简单方法是什么?我的目标机器无法访问互联网,因此我认为通过网络服务进行验证不是最好的做法。

我只是不想让他们复制我的程序并在其他机器上运行它,甚至自己出售它。

I'm about to deliver my freelance Windows Forms project.

What is the easiest way to handle licensing? My target machine doesn't have internet access so I don't think validating via a webservice would be the best course of action.

I just don't want them to copy my program and run it on other machines, or even sell it themselves.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

感悟人生的甜 2024-10-22 04:15:19

有很多方法可以做到这一点,它们都取决于您的目标受众/部署环境。

由于您无法打电话回家,因此您需要依靠序列号。如果您有客户端/服务器架构,那么您可以将注册存储在服务器上,客户端可以检查它们。

如果它只是一个仅限客户端的应用程序,那么您可以 1) 使用序列号 2) 让它们生成一个串行请求,该请求使用它们的 MAC 地址或其他一些唯一标识符来确定它们正在安装的计算机。这样,当您根据他们的请求发出序列号时,它将仅在生成请求的计算机上运行。

There are so many ways of doing it and they all depend on what your target audience/deployment environment is going to be.

Since you can't call home, you will need to rely on serial numbers. If you have a client/server architecture, then you can store the registrations on the server and clients can check them.

If it's just a client only app then you can 1) use serial numbers 2) have them generate a serial request which uses their MAC address or some other unique identifier to determine the machine they are installing on. This way when you issue a serial based on their request, it will only work on the machine in which the request was generated.

思念绕指尖 2024-10-22 04:15:19

您可以使用加密狗,我认为这是最安全的方法。
加密狗可以保存应用程序的敏感部分,并且在加密狗插入 USB 端口之前应用程序不会运行,您应该阅读更多相关信息,我认为有一个用于 dotnet 应用程序的特殊加密狗。
相信我,我们在公司中使用它很长时间。

You can use a dongle, i think it's the safest way.
A dongle can hold sensitive parts of your application and the application will not run until the dongle plugged in usb port, you should read more about it and i think there is a special dongle for dotnet apps.
Trust me we use it in our company form long time.

帅哥哥的热头脑 2024-10-22 04:15:19

如果您的软件条款规定这就是其许可方式,那么这就足够了。

不要忘记,自从您编写了此软件以来,您很可能会被召回以进行修复/增强。这应该给您充足的机会来查看您的许可证是否被滥用。

If the terms of your software say that's how it is licensed, then that should be enough.

Don't forget that since you wrote this software, chances are good that you will be called back for fixes/enhancements. This should give you plenty of opportunity to see if your license is being abused.

真心难拥有 2024-10-22 04:15:19

有一些混淆解决方案可以提供内置的许可安全性。您可以尝试其中之一。 XenoCode 就是其中之一。 http://www.xenocode.com/

There are obfuscation solutions that provide built in licensing security. You can try one of those. XenoCode is one of them. http://www.xenocode.com/

故人爱我别走 2024-10-22 04:15:19

包括您的软件的安装程序。该安装程序应设置一些注册表项,以标识该计算机具有有效的安装;然后,您的程序将询问这些键并确定它是否应该运行。

如何生成这些密钥以及它们应该是什么的问题取决于您想要获得的深奥程度。它们越简单,您就越容易实现,但也越容易被欺骗。如果您只是想让购买许可证比欺骗安装更容易,您可以通过让安装程序需要一个许可证密钥来实现这一点,该许可证密钥可以由它解密成它所期望的内容(例如用户也输入的名称) )。然后它可以加密并设置一个注册表项,您的程序将在开始确定有效安装时解密该注册表项。这可以被欺骗,并且在没有互联网访问的情况下并不能证明一个人没有在多台计算机上使用相同的密钥。

如果您想确保每个安装都单独获得许可,那么您必须能够访问互联网,因为您的安装程序或程序本身必须与集中式 Web 服务(或许可证密钥服务器,对于企业安装来说很常见)进行通信以确定该密钥是真实的并且当前未被另一台计算机使用。

Include an installer for your software. This installer should set some registry keys that identify this machine as having a valid installation; your program will then interrogate those keys and determine if it should run.

The question of how to produce those keys and what they should be is answered by how esoteric you want to get. The simpler they are, the easier for you to implement, but the simpler for them to spoof. If you just want to make it easier to buy a license than to spoof the install, you can do that by having the installer require a license key that can be decrypted by it into something it will expect (like the name the user also typed in). Then it can encrypt and set a registry key that your program will decrypt when it starts to determine a valid install. This can be spoofed, and without Internet access it does not prove that one person is not using the same key on many computers.

If you want to make sure that EVERY installation is individually licensed, without fail, you must have internet access, because your installer or your program itself will have to talk to a centralized web service (or a license key server, common for enterprise installs) to determine that the key is genuine and not currently in use by another computer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文