How to invoke an executable from a wcf service?

gently

New Member
I need to invoke a third party executable from my WCF service. The executable, if runs, creates an output file which I need to read and extract some data and send back to the service client.The service is hosted in IIS and Win Server 2003.Here is the following code I tried:\[code\]ProcessStartInfo startInfo = new ProcessStartInfo();startInfo.CreateNoWindow = true;startInfo.UseShellExecute = false; using (Process exeProcess = Process.Start(startInfo)) { exeProcess.WaitForExit(); if (exeProcess.ExitCode != 0) { throw new Exception("Error while running the executable!"); } return "Success";// just for debugging }\[/code\]startInfo object has the arguments and the filename[full path].I always get the exception and never the executable creates the output file!But when I run the application manually on the server it works fine. I tried using the same account credentials through the startInfo object, even then it failed.Can anyone please help me out here.Thanks
 
Back
Top