Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have developed a web-based application in .Net 4.5 (C#) framework with SQL Server 2016 database.

I want to host it locally on my client's system. (On local IIS. No internet is required for application to run.)

Now I want to create an executable file for the setup on the client system. My question is, How can I create an executable file in .Net so that I can restrict the number of installation of my software/ application per client system and overall?

Is there any way to put the installation limit using code/ configuration while creating a setup file?

What I have tried:

I have created a setup file of my application by the Visual Studio installer.
Posted
Updated 12-Feb-20 3:12am

Quote:
I want to host it locally on my client's system. (On local IIS. No internet is required for application to run.)

Now I want to create an executable file for the setup on the client system. My question is, How can I create an executable file in .Net so that I can restrict the number of installation of my software/ application per client system and overall?


In this case, there's no chance...

The only one chance is when the installator is connecting with your server, checks for number of installation used by specific client, then enables client to install the programme.
 
Share this answer
 
v2
No, not in practice - unless your app always has access to the internet, and then you can do something.

Think about it: If I install your app in a VM, I can give you a copy of that VM and you can run it. Each copy thinks it's the original installation, and only if they both try to connect to your server can they tell otherwise.

And a setup file you can't really change while you are installing, as it could be on a CD for example. Saving a file locally doesn't help as the local file will not be available to the next machine I load your app on.
 
Share this answer
 
There's no easy way. You need a hardware solution.
Search online for software licensing and protection systems. It will cost money and you will probably have to provide your customer with a dongle.
In my applications I favour Wibu Systems CodeMeter (I have no connection with the company) but you may find that one of the other solutions suits you better.
Remember that whatever protection you apply could be quite easily circumvented unless the .NET code is obfuscated and/or (better) encrypted.
 
Share this answer
 
In Inno Setup you can use SetupMutex, but this only works to prevent multiple installations on the same system. More information here:
Inno Setup - prevent executing the installer multiple times simultaneosly - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900