Thursday, 15 March 2012

c# - Starting process only works in console application -



c# - Starting process only works in console application -

i trying launch external exe web application (running on visual studio development server). when run code below console application works fine, when run web page application crashes. presume must permissions issue, have tried few things , not been able working.

private void runexe(string pythonoutputfilenameandlocation) { var process = new process { startinfo = getprocessstartinfo(pythonoutputfilenameandlocation) }; // application crashes process.start(); // ...do more things here } private processstartinfo getprocessstartinfo(string pythonoutputfilenameandlocation) { var startinfo = new processstartinfo { createnowindow = true, useshellexecute = false, redirectstandardoutput = true, redirectstandardinput = true, filename = _exefilelocation, windowstyle = processwindowstyle.hidden, arguments = string.format("--hideui --runscript {0}", pythonoutputfilenameandlocation) }; homecoming startinfo; }

what asking why code work console application, not visual studio web server?

i using windows 7 , visual studio 2010.

edit:

as requested here problem details beingness caught windows:

problem event name: bex application name: application version: 2.2.2.2909 application timestamp: 507bf285 fault module name: msvcr100.dll fault module version: 10.0.40219.325 fault module timestamp: 4df2be1e exception offset: 0008af3e exception code: c0000417 exception data: 00000000 os version: 6.1.7601.2.1.0.256.48 locale id: 2057 additional info 1: c5a0 additional info 2: c5a0d9e876212c0d3929ba8445f002dc additional info 3: 5e93 additional info 4: 5e93e44f8aa24f99d37e055f533d1658

i can't debug external application don't have code it. don't have stack trace not getting exception. external process crashing.

thanks

ronnie, might running uac , security access issue. seek disabling uac , trying again. also, consider on real webserver process started asp.net or web user permissions. these accounts limited on purpose security reasons. means application trying start may fail because cannot access files needs. reason starting external exe web server not recommended. however, can check stackoverflow question running applications admin credentials. how run c# application admin creds?

c# process permissions

No comments:

Post a Comment