Starting a new process in a asp.net web service
Posted
by Deumber
on Stack Overflow
See other posts from Stack Overflow
or by Deumber
Published on 2010-04-13T20:30:59Z
Indexed on
2010/04/13
20:33 UTC
Read the original article
Hit count: 283
I have the following code:
public void BeginConvert(object data)
{
ConverterData cObject = (ConverterData)data;
string argument = string.Format("-i \"{0}\" -b {1} \"{2}\"", cObject.Source, compression, cObject.Destiny);
Process converterProcess = new Process();
converterProcess.StartInfo.FileName = ffPath;
converterProcess.StartInfo.Arguments = argument;
converterProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
converterProcess.Start();
converterProcess.WaitForExit();
}
I use it in a webservice, i start it in a new thread and it return exit code 1 (error, i'm trying to do a video convertion with ffmpeg library), i impersonate ASP.NET to use a local account with permissions to read and write files, when i run it in my machine running or debugging it works but know thta the web service is running in IIS doest'n. Could someone help me?
© Stack Overflow or respective owner