0

Hi I am having issues lunching an exe file from within an asp.net mvc application with an argument. I am trying to consolidate several systems into one portal and remove logins from the individual systems (arguments are to communicate access level) When the exe was located on my local C drive the following code worked perfectly.

System.Diagnostics.Process.Start(@"C:\test.exe", "Argument");

The application lunched and the argument was processed.

However when attempting to do the same thing with the exe hosted in an IIS folder I am prompted to open save or cancel. And on selecting open the argument is not passed to the application. I am attempted to resolve this by adding an handler access policy to include execute on the folder the exe is in. This just results in a 404 error.

So in summery I am trying to launch an application that is stored in an IIS directory with an argument. I can launch the application but the argument is not passed.

Thanks

sszarek
  • 434
  • 2
  • 12
Chao226
  • 332
  • 2
  • 10
  • possible duplicate of [System.Diagnostics.Process.Start not work fom an IIS](http://stackoverflow.com/questions/4679561/system-diagnostics-process-start-not-work-fom-an-iis) – Guillaume Apr 27 '15 at 09:52

1 Answers1

0

I am sorry Dave, I cannot do that. (Couldn't resist)

IIS won't allow this. Your best option is to implement the code of your .exe in your MVC application, i.e. "webinize" your application and make it a method within your MVC app.

LocEngineer
  • 2,847
  • 1
  • 16
  • 28