T
tshad
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 mutexPrinterFile;
In my program:
AppSettings.mutexPrinterFile = new Mutex(false, "Repository
Printer Mutex");
AppSettings.mutexPrinterFile.WaitOne();
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
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 mutexPrinterFile;
In my program:
AppSettings.mutexPrinterFile = new Mutex(false, "Repository
Printer Mutex");
AppSettings.mutexPrinterFile.WaitOne();
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