c# - Why can't my .exe ALWAYS write a file from a webservice? -


this issue has me pulling hair out. tl:dr; iis 7.5 webservice calls .exe writes file. works when navigate .asmx page (not in debug/cassini, actual iis in chrome/ff) doesn't work when call service applicaiton. webservice call need come windows service call.


        // --------------------------------------------------------------------          //      use utms corners projwin in gdal_translate call below                                           // --------------------------------------------------------------------          string sexecutionfile = string.empty;         if ((configurationsettings.appsettings["bin_path"]!=null) && file.exists(configurationsettings.appsettings["bin_path"] + "/gdal_translate.exe"))             sexecutionfile = path.combine(configurationsettings.appsettings["bin_path"],"gdal_translate.exe");         else             sexecutionfile = "gdal_translate.exe";          processstartinfo psi = new processstartinfo(sexecutionfile,             "-projwin " + pointul[0] + " " + pointul[1] + " " +              pointlr[0] + " " + pointlr[1] + " " +             simagefilename + " " + sresultsfilename);          psi.useshellexecute = false;         psi.redirectstandardoutput = true;         psi.redirectstandardinput = true;         psi.redirectstandarderror = true;         psi.createnowindow = true;          using(myprocess = new process())         {          myprocess.startinfo = psi;          myprocess.start();          myprocess.waitforexit();          myprocess.close();          myprocess.dispose();         } 

the above code calls small exe generate tiff tiff file. it's in dll wrapped in webservice call. i've got working , can go localhost server, run "dataservice.asmx" page created, fill out form , biggity-bam, have tiff in new directory (also created webservice). wrote small command-line applicaiton attempt call webservice. happily calls webservice , few others tried testing purposes. problem new directory created, there's never tiff files inside of it. after debugging, code complaining above code didn't create file. what missing?

i've tried variety of iis 7.5 config options os-level permissions on relevant directories. going way "localsystem" yields same behavior going down "apppoolidentity", "iusr"... have believe above code failing, if it's not throwing exceptions @ all. there better way debug processstartinfo call iis webservice? understand if didn't work @ all, or if had run admin account work, call works when invoke directly .asmx page.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -