I am running a program as a Windows service which works fine.
I am using a Mutex to prevent multiple threads from from accessing my log
text file at the same time. It works fine in the Service:
In my AppSettings class:
public static Mutex mutexPrinterFil e;
In my program:
AppSettings.mut exPrinterFile = new Mutex(false, "Repository
Printer Mutex");
AppSettings.mut exPrinterFile.W aitOne();
When I run this program as a Windows program (same code) - I get an Access
Denied error.
I also using impersonation to allow me to move my files to another folder on
another server. Inside the Impersonation code is where I am having the
problem.
How would I change this to allow me to work with my logon credentials or the
impersonation credentials?
Obviously, it has no problem when running as a Windows Service and the
Impersonation credentials.
Thanks,
Tom