Salte1

I have a mutex access problem. It's a little complicated so please bear with me here...

There are three software components:

One windows service running on the local system account that starts automatically.

One windows service running on an administrator user account.

One windows application.

The last two of these components share a named mutex. The windows application might be run on a user account with limited rights, so the mutex has been assigned MutexAccessRules to make sure this user may access the mutex.

If the windows service sharing the mutex is started manually (from admin account), and the the windows application is started from a limited user account there is no problem.

However, if this service is started by the other windows service (the one running on the local system account) then the limited user will not be able to start the windows application (the application throws an UnauthorizedAccessException, refering to the mutex in question). If the windows application is started from an administrator account there is no problem.

So what causes the problem, and, more importantly, how do i fix it

(feel free to ask if you don't completely understand the problem :)



Re: Visual C# General Mutex mystery

Ernst Kuschke

If your service that shares the mutex is started by the service running as the local system account, it will also be running as local system...