C
C#2y ago
Zaina

❔ 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
ChucklesTheBeard
define "doesn't work"
Zaina
ZainaOP2y ago
ProcessStartInfo startInfo = new ProcessStartInfo(Path to exe); var process = new Process(); process.StartInfo = test; process.Start(); this code doesn't run the exe
BananaPie
BananaPie2y ago
could it be permission issue? do you have any logging? windows event logs?
Zaina
ZainaOP2y ago
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
BananaPie
BananaPie2y ago
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
Zaina
ZainaOP2y ago
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
phaseshift
phaseshift2y ago
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
Zaina
ZainaOP2y ago
sorry @phaseshift I didn't understand every thing in your answer ... I run the exe manually ?
phaseshift
phaseshift2y ago
yes
Zaina
ZainaOP2y ago
that works if i run it manually
phaseshift
phaseshift2y ago
on the server?
Zaina
ZainaOP2y ago
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
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server