c# - Process exists with ExitCode 255 -


[iis 7.5 / windows 7 / visual studio 2012]

i trying have mvc app run external command line tool located on same machine.

i gave execute permissions iis_usrs whole folder contains tool.

i invoke with:

processstartinfo startinfo = new processstartinfo();   startinfo.windowstyle = processwindowstyle.normal;   startinfo.filename = mypath;   startinfo.arguments = myarguments;   partialrunprocess = process.start(startinfo);   

no exceptions (path right), process exists rightaway exitcode 255

i can execute process manually.

what cause ?

exit code 255 sounds .net exception within tool (target application) you're running. you'll not able catch exception in code.

i register debugger target application see exception throws:

  1. go hkey_local_machine\software\microsoft\windows nt\currentversion\image file execution options

  2. create key name of executable you're starting

  3. create string called debugger

  4. give value, e.g. vsjitdebugger.exe if it's .net application

this start debugger , can catch exceptions.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -