views:

51

answers:

1

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?

+1  A: 

I can say with almost 100% certainty that this is a permissions issue. How are you doing the impersonation? Do you have the same username/password configured on the server?

Another possibility of course is that the target executable in StartInfo.FileName is not in the right place.

Check the Event Viewer for unhandled exceptions and you may get more information.

Bryan
+1 on the Event Viewer suggestion.
BenV