I have a problem executing a process from our testing server. On my localhost using windows XP and iis5.1 I changed the machine.config file to have the line -
I then changed the login for iis to log on as local system account and allow server to interact with desktop. This fixed my problem executing a process from code in xp.
When using the same method on windows server 2003 (using iis6 isolation mode) the process does not get executed.
Here is the code to execute the process (I have tested the inputs to iecapt through the command line and an image is generated) -
public static void GenerateImageToDisk(string ieCaptPath, string url, string path, int delay)
{
url = FixUrl(url);
ieCaptPath = FixPath(ieCaptPath);
string arguments = @"--url=""{0}"" --out=""{1}"" --min-width=0 --delay={2}";
arguments = string.Format(arguments, url, path, delay);
ProcessStartInfo ieCaptProcessStartInfo = new ProcessStartInfo(ieCaptPath + "IECapt.exe");
ieCaptProcessStartInfo.RedirectStandardOutput = true;
ieCaptProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
ieCaptProcessStartInfo.UseShellExecute = false;
ieCaptProcessStartInfo.Arguments = arguments;
ieCaptProcessStartInfo.WorkingDirectory = ieCaptPath;
Process ieCaptProcess = Process.Start(ieCaptProcessStartInfo);
ieCaptProcess.WaitForExit(600000);
ieCaptProcess.Close();
}
By default the IIS user account has deny privileges. Try taking those off and also make sure you have write permission for the account that IIS is running the application pool under. I believe this is the network service account.