Question: How can I create a product key for my C# Application?

I need to create a product (or license) key that I update annually. Additionally I need to create one for trial versions.

> 
> Related:
> 
> 
> * [How do I best obfuscate my C# product license verification code?](https://stackoverflow.com/questions/501988)
> * [How do you protect your software from illegal distribution?](https://stackoverflow.com/questions/109997)
> 
> 
>

Answer: 
There is the option [Microsoft Software Licensing and Protection](http://www.microsoft.com/slps/) (SLP) Services as well. After reading about it I really wish I could use it.

I really like the idea of blocking parts of code based on the license. Hot stuff, and the most secure for .NET. Interesting read even if you don't use it!

> 
> Microsoft® Software Licensing and
>  Protection (SLP) Services is a
>  software activation service that
>  enables independent software vendors
>  (ISVs) to adopt flexible licensing
>  terms for their customers. Microsoft
>  SLP Services employs a unique
>  protection method that helps safeguard
>  your application and licensing
>  information allowing you to get to
>  market faster while increasing
>  customer compliance.
> 
> 
> 

Note: This is the only way I would release a product with sensitive code (such as a valuable algorithm).
Another good inexpensive tool for product keys and activations is a product called InstallKey. Take a look at [www.lomacons.com](http://www.lomacons.com)