Z
ZUP_DUDE
I have a webservice that is using impersonation. The web service needs
to call a System.Diagnostics.Process to execute a batch file. I am
having problems executing the batch file. It works fine on my machine
but when I execute the process on the Server nothing seems to happen. I
think it is because I need to pass the credentials to the Process
thread. Is there any way to attach a WindowsIdentity to a
System.Diagnostics.Process?
An example of the process code is as follows.
WindowsIdentity winID = WindowsIdentity.GetCurrent();
// Would like to attach winID to the Process
Process process = new Process();
process.StartInfo.FileName = batchFileToRun; // Contains the batch
file name and path
process.StartInfo.Arguments = batchFileArgs; // Arguments to pass to
the batch file
process.Start();
process.WaitForExit();
process.Close();
Thanks in advance!
to call a System.Diagnostics.Process to execute a batch file. I am
having problems executing the batch file. It works fine on my machine
but when I execute the process on the Server nothing seems to happen. I
think it is because I need to pass the credentials to the Process
thread. Is there any way to attach a WindowsIdentity to a
System.Diagnostics.Process?
An example of the process code is as follows.
WindowsIdentity winID = WindowsIdentity.GetCurrent();
// Would like to attach winID to the Process
Process process = new Process();
process.StartInfo.FileName = batchFileToRun; // Contains the batch
file name and path
process.StartInfo.Arguments = batchFileArgs; // Arguments to pass to
the batch file
process.Start();
process.WaitForExit();
process.Close();
Thanks in advance!