❔ process.start() works in debug not in iis
Hello every one. I have an application on iis. The application should run an exe with process start(). The exe is in a folder in the server. This works finely on debug but once I publish it to iis that doesn't work. Does any one have an idea ?
13 Replies
define "doesn't work"
ProcessStartInfo startInfo = new ProcessStartInfo(Path to exe);
var process = new Process();
process.StartInfo = test;
process.Start();
this code doesn't run the exe
could it be permission issue?
do you have any logging? windows event logs?
I have no error in my logs, and I get a processId, but when i go to task manager i don't find this process
weird, can you try to attach a remote debugger to your iis application? step into the code and see what happened, other than that, I don't have any clues
Thank you 🙂 yes I attached a debugger, the code is executed without any error ...
i found i processID, but when i search it in task manager i don't find it
Maybe the process is exciting quickly. You should capture the standard outputs from the process and log it, or remote into the server, try to launch the process yourself and watch for errors
sorry @phaseshift I didn't understand every thing in your answer ... I run the exe manually ?
yes
that works if i run it manually
on the server?
yes. actually I try to run it localy after deploying to my local IIS, and even in local the exe is not running
for test, I put the path to notepad exe for example
in debug every thng is ok, once the application is published when I call the controller which is responsable of running the exe that doesn't work
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.