B
Bryan Ax
We have some code that's having problems when multiple applications
running as different identities try to hit this code - the code creates
a Mutex, and when the second identity tries to access it, it fails
because the Mutex currently has the permissions of the first identity,
along the lines of this article:
http://bobmoore.mvps.org/Win32/w32tip7.htm
I'm trying to create a unit test to recreate this situation so that I
can get it to fail, and therefore, fix the Mutex problem and make sure
it works correctly. However, I'm more of a web developer, so am having
some problems with threading.
I'm able to create multiple threads in a unit test, i.e.:
ThreadStart threadDelegate = new ThreadStart(SomeClass.SomeMethod);
Thread newThread = new Thread(threadDelegate);
newThread.Start();
ThreadStart thread2 = new ThreadStart(SomeClass.SomeMethod);
Thread newThread2 = new Thread(thread2);
newThread2.Start();
but I need to do this where these threads are running under different
identities. Any help appreciated.
Bryan
running as different identities try to hit this code - the code creates
a Mutex, and when the second identity tries to access it, it fails
because the Mutex currently has the permissions of the first identity,
along the lines of this article:
http://bobmoore.mvps.org/Win32/w32tip7.htm
I'm trying to create a unit test to recreate this situation so that I
can get it to fail, and therefore, fix the Mutex problem and make sure
it works correctly. However, I'm more of a web developer, so am having
some problems with threading.
I'm able to create multiple threads in a unit test, i.e.:
ThreadStart threadDelegate = new ThreadStart(SomeClass.SomeMethod);
Thread newThread = new Thread(threadDelegate);
newThread.Start();
ThreadStart thread2 = new ThreadStart(SomeClass.SomeMethod);
Thread newThread2 = new Thread(thread2);
newThread2.Start();
but I need to do this where these threads are running under different
identities. Any help appreciated.
Bryan