I developed an application that is hosted in one server. Many users access to it via Remote Desktop connection, but sometimes I saw in the task manager that the same user ha
The recommended way to see if another instance of your application is already running is to use a Mutex. See here for example.
Since you want to allow multiple instances of the application to run if different users run them, simply add the current user name to the mutex's name. For example, call the Mutex "MyApp"+Environment.UserName
You can create a mutex with the user's name.
bool b = true;
Mutex mutex = new Mutex(true, Environment.UserName.ToLowerInvariant() , out b);
if (!b) throw new InvalidOperationException("Another instance is running");