如何在C#.Net中为Windows应用程序授予许可 [英] how to give licensing for the windows application in C#.Net

查看:150
本文介绍了如何在C#.Net中为Windows应用程序授予许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我需要为我的项目提供许可证。



一旦我的项目(软件)已安装。我需要跟踪安装日期,然后从15天后的该日期开始。应显示15天跟踪版本软件到期的消息。



然后我将从License Manager生成许可证密钥并授予对我的软件的访问权限。



如何在C#.net


提前致谢。

Hi All,

I need to give liciensing for my project.

Once my project(software) is installed.i need to track the date when it is installed then from that date after 15 days.should display the messages 15 days trail version software expires.

Then i will genereate the license key from License Manager and give the access to my software..

How to implement this part in Windows application in C#.net

Thanks in advance.

推荐答案

查看这些:



如何在VS.NET中创建的MSI设置中验证序列号或PID [ ^ ]



http:/ / STAC koverflow.com/questions/453030/how-can-i-create-a-product-key-for-my-c-app [ ^ ]



许可密钥生成 [ ^ ]



希望这会有所帮助: )
check these out:

How to Validate a Serial Number or PID in MSI Setups Created in VS.NET[^]

http://stackoverflow.com/questions/453030/how-can-i-create-a-product-key-for-my-c-app[^]

License Key Generation[^]

hope this helps :)


当您的应用程序第一次启动时,此时创建一​​个原始密钥,其中包含

系统的MAC地址,

当前日期时间,和

其他详细信息。



然后用任何算法加密原始密钥。



创建另一个应用程序(许可证生成器),它将解密原始密钥并为您生成许可证密钥。



许可证密钥将包含详细信息of:

MAC地址(来自原始密钥)

当前日期时间(来自原始密钥)

应用程序类型(演示或许可证)(来自许可证生成器)

如果演示到期日(来自许可证生成器)



然后加密许可证详细信息



然后取得该许可证关键并将其投入实际应用。



每次开始你都可以查看到期日。



您可以将原始密钥和许可证密钥存储在数据库,应用程序属性或配置文件中。
When your application start at first time, at that time create a raw key which will contain
MAC address of system,
Current DateTime, and
additional details.

Then encrypt the Raw key with any algo.

Create another application (License Generator) which will decrypt the raw key and generate a license key for you.

License key will contain the details of :
MAC address(from raw key)
Current DateTime(from raw key)
Application Type (Demo or License) (from License Generator)
If demo that Expiry days (from License Generator)

Then encrypt the license details

Then take that license key and put it into actual application.

On every start you can check the expiry days.

You can store the Raw Key and License Key in Database, application Properties or in config file.


至于跟踪试用版安装日期的问题,您可以参考在哪里 [ ^ ]因为这也是之前提出的一个问题。



一个朋友提醒,永远不要将您的问题作为解决方案发布。相反,将其作为对解决方案的评论发布,或者如果它是一个不同的问题,您可以创建一个新问题。
As for your problem regarding tracking the date installed for trial versions, you may refer here[^] as this was also a question asked before.

A friendly reminder, never post your questions as a solution. Rather, post it as a comment to the solutions, or you can create a new question if its a different issue.


这篇关于如何在C#.Net中为Windows应用程序授予许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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