Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Licensing a program

(Oct 20, 2022 08:07 AM)GruntStyl Wrote:  I developed the NoBot software about 7 years ago. And made my own licensing system with MySQL and creating our own Private API to communicate between the Client and Server for authentication. It's worked so well we haven't changed the setup since. And since MySQL is free there is no overhead/commission payment you have to make to a third party.

If you go this route, a word of advise if using MySQL would be to do it the right way. Do NOT make a direct connection to MySQL through your application. Have a secure connection or create your own API for communication between the two (Client & Server).

That would be my Recommendation.

would you consider sharing the license system? if not, completely understandable
(Nov 3, 2022 08:23 PM)john ronaldsad Wrote:  would you consider sharing the license system? if not, completely understandable

It's closed source to myself and a couple others that Run NoBot in specific. Since it is proprietary It wouldn't really help anyone elses needs regardless, as it functions specifically for our application.

However it is quite simple. Look up how to setup a MySQL database. Have a client and server. Setup a TCP listener for connection on server. And have your application connect to it. Encrypt your traffic. And have your server internally manage (Locally) your MySQL information and send back and forth the data to your licensing system. It may sound like a lot to manage through but it really isn't. You can find source code online to piece everything together in a couple hours. Or if you're really new to that type of stuff maybe a day or two.

Side note: you'll also need to know how to port forward but I'd assume anyone setting up a listening system would already know how to do that, just figured I'd throw the extra info out there anyways.


If I see more threads asking about how to setup a licensing system, maybe I'll make a quick Github project for a simple setup down the road. Until then I have confidence you'll figure it out! 👍
[Image: 5Lxbaet.png]
(Nov 4, 2022 07:13 AM)GruntStyl Wrote:  It's closed source to myself and a couple others that Run NoBot in specific. Since it is proprietary It wouldn't really help anyone elses needs regardless, as it functions specifically for our application.

However it is quite simple. Look up how to setup a MySQL database. Have a client and server. Setup a TCP listener for connection on server. And have your application connect to it. Encrypt your traffic. And have your server internally manage (Locally) your MySQL information and send back and forth the data to your licensing system. It may sound like a lot to manage through but it really isn't. You can find source code online to piece everything together in a couple hours. Or if you're really new to that type of stuff maybe a day or two.

Side note: you'll also need to know how to port forward but I'd assume anyone setting up a listening system would already know how to do that, just figured I'd throw the extra info out there anyways.


If I see more threads asking about how to setup a licensing system, maybe I'll make a quick Github project for a simple setup down the road. Until then I have confidence you'll figure it out! 👍

it has been a while i didn't comment, but people still asks for licensing system, maybe i could open source mine one day
(Nov 12, 2022 03:35 AM)EagleEye Wrote:  it has been a while i didn't comment, but people still asks for licensing system, maybe i could open source mine one day

Please???? It would be of much appreciation

(Nov 4, 2022 07:13 AM)GruntStyl Wrote:  It's closed source to myself and a couple others that Run NoBot in specific. Since it is proprietary It wouldn't really help anyone elses needs regardless, as it functions specifically for our application.

However it is quite simple. Look up how to setup a MySQL database. Have a client and server. Setup a TCP listener for connection on server. And have your application connect to it. Encrypt your traffic. And have your server internally manage (Locally) your MySQL information and send back and forth the data to your licensing system. It may sound like a lot to manage through but it really isn't. You can find source code online to piece everything together in a couple hours. Or if you're really new to that type of stuff maybe a day or two.

Side note: you'll also need to know how to port forward but I'd assume anyone setting up a listening system would already know how to do that, just figured I'd throw the extra info out there anyways.


If I see more threads asking about how to setup a licensing system, maybe I'll make a quick Github project for a simple setup down the road. Until then I have confidence you'll figure it out! 👍

Still considering open sourcing? I could use a licensing program
I recommend Keyauth if you know what you are doing
looking for work
I released an open source .NET licensing system on my GitHub and can be found in my sig.

Its not secure in its current state however you could convert it to a CRUD API using php like how in the Login.cs does and it has a basic implementation to use a php API.

Good luck!
[Image: hf.png]
Rep for rep!
(Nov 12, 2022 03:35 AM)EagleEye Wrote:  it has been a while i didn't comment, but people still asks for licensing system, maybe i could open source mine one day

would you be ever so kind and please release the source code?
(Jul 30, 2021 07:55 PM)john ronaldsad Wrote:  Hi there, earlier i accidentally posted this in the wrong section, anyways, I'm trying to get into selling software I've made, but I'm not too sure how to add License keys, I don't want to hardcode keys into the program (for obvious reasons) I want to setup an online activation type of service where when you press "register" it validates the key from a database. Any help would be appreciated! thanks

Take a look here it might be interesting https://www.zluri.com/blog/software-lice...ment-tools
(Jul 4, 2025 02:51 AM)ʀ00ȶʐɨʟʟǟ Wrote:  Take a look here it might be interesting https://www.zluri.com/blog/software-lice...ment-tools

I’d prefer to self host my own licensing system.
(Jul 7, 2025 12:14 PM)john ronaldsad Wrote:  I’d prefer to self host my own licensing system.

Thats cool wise choice!!!
(Jul 7, 2025 12:14 PM)john ronaldsad Wrote:  I’d prefer to self host my own licensing system.

To add proper license key validation, you can create a small online activation system where your software sends the entered key to a server (via HTTPS), which checks it against a database. If valid, the server responds with confirmation and optional license details (like expiry or device limit). Your app then stores a signed or encrypted token locally for offline validation. This avoids hardcoding keys and gives you full control over key management, device limits, and license expiration. It will be not as easy as it looks.
[Image: 9428137.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by StaticCGJul 3, 2025 02:00 AM 19 1,170 Jul 3, 2025 02:00 AM
Last Post: john ronaldsad
by SuddenStrike2Jul 27, 2024 08:19 AM 13 503 Jul 27, 2024 08:19 AM
Last Post: SuddenStrike2
[C] by Lithium MindAug 26, 2022 06:22 AM 6 553 Aug 26, 2022 06:22 AM
Last Post: WingsOfAltair