T
tshad
I am trying to execute a program from my web page on a 2003 server.
Both the program and the web application are on the same server.
The program normally runs as a scheduled task but we need to allow the
inhouse users to be able to manually start the program which just reads a
file and fills various tables with it.
When I run it on my workstation, it works fine. We have a user defined to
run the program and I am using impersonation to run the program.
The problem is that it doesn't seem to execute on the server.
Is there something special I need to set up this up?
My code to execute the program is (with program containing the path and
executable name):
// Impersonate, automatically release the impersonation.
using (new Impersonator("User", "server", "password"))
{
Process p = new Process();
p.StartInfo.FileName = program;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
This runs on my laptop running IIS without any problem (without the
impersonation).
Thanks,
Tom
Both the program and the web application are on the same server.
The program normally runs as a scheduled task but we need to allow the
inhouse users to be able to manually start the program which just reads a
file and fills various tables with it.
When I run it on my workstation, it works fine. We have a user defined to
run the program and I am using impersonation to run the program.
The problem is that it doesn't seem to execute on the server.
Is there something special I need to set up this up?
My code to execute the program is (with program containing the path and
executable name):
// Impersonate, automatically release the impersonation.
using (new Impersonator("User", "server", "password"))
{
Process p = new Process();
p.StartInfo.FileName = program;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = false;
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
p.Start();
}
This runs on my laptop running IIS without any problem (without the
impersonation).
Thanks,
Tom