Multi-user limit

Hi,

How can I create application that only 5 users (or some other quantity) can ran program from server?

Thank's
Alexei

[129 byte] By [Alexei_shk] at [2007-12-16]
# 1
You could put the application in a shared directory. And limit the number of (concurent) users using that directory
More info:

http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/4ad21194-c950-4655-beef-674827ce0a89.mspx

Or you could write a webapp and limit the users using a application-level variable which counts the concurent users.

MarinusHolkema at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
Hi,

This is not what I want... I want create the lisence system...
For example:
If my application has 5 lisence that means that 5 users only can run it.

The application can run from local computer but it checkes on server that it has license to run.

Thank's
Alexei

Alexei_shk at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Hi,

Activation schemes are not easy to write and can be easily overcome. One of the ways to do this, is to use the MAC Address as a way to uniquely identify a machine. But these days, the MAC Address can also be configured - so its easy to overcome this.

If you still would like to proceed with such a scheme then, you can have a GUID issued for each customer and require the customer to activate. On clicking the activate option, application would need to send back the MAC Address and Guid combination to ur server. You can then determine if this being installed on more than 5 machines seeing the uniqueness of the MAC Address.

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 4
Hi,

It can help me...
I mean in my example that server and client (local) will installed on computers of Client Company.

Thank's
Alexei

Alexei_shk at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 5
Hi,

Let me explain a bit more since you feel it can help.

First, the GUID part. You simply use the System.Guid class to generate unique Guid for each customer. You would need to generate this on the server and probably send it to the customer by email as an XML file and say that the XML file needs to be stored in the same directory as the .EXE file. This is generated only once per customer and stored in the database.

Next is the code part. The .EXE of your app has to do the following on startup:
It has to read the .XML file on first run and pick up the Guid. It will then retrieve the Mac Address of the machine on which it is running and then contact the server with the details of Guid from XML file as well as the Mac Address.

On the server you can simply increase the count based on the Guid as the key. Once the count reaches 5, you say that licenses have run out.

Sample in C# for getting Mac Address:


ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");

ManagementObjectCollection moc = mc.GetInstances();

foreach(ManagementObject mo in moc)

{

if((bool)mo["IPEnabled"] == true)

MessageBox.Show("MAC address : " + mo["MacAddress"].ToString());

mo.Dispose();

}


Regards,
Vikram
Vikram at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 6
Hi,

You tell me here that the xml file send them by email from our server. But I need that the server is installed on client server. I need there the application that counting how much license in use and when the user have start his application on his PC it sends to the server information and it response if he has license to run application for now. If someboby closes the application the license will be free for another user (in same company).

I have 2 problems:
1) I doesn't free license when user PC is crashed.
2) I want to do this with maximum security and with low network using.

So how can I solve it?

Thank's
Alexei

Alexei_shk at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...