it woks from the cmd, but when debugging won’t go into while condiion, any ideas why please ? Browsing for the site in IIS returns with exception :
System.ComponentModel.Win32Exception: Access is denied.
string video;
string thumb;
video = System.Web.HttpContext.Current.Server.MapPath("Video/test.avi");
thumb = System.Web.HttpContext.Current.Server.MapPath("Video/frame.jpg");
Process proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = System.Web.HttpContext.Current.Server.MapPath("Video/ffmpeg.exe"),
Arguments = " -i " + video + " -ss 00:00:03 -vframes 1 -f image2 -vcodec mjpeg " + thumb,
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
proc.Start();
while (!proc.StandardOutput.EndOfStream)
{
string line = proc.StandardOutput.ReadLine();
}
This is because the user security context of the IIS process does not have the rights to run the application.