0

I want to call an exe file from my asp.net application on server side. My app contain a GUI but I don't want to modify it , just launched it like a console app.

It's currently working on IIS EXPRESS( when I debug with VS ) but not working on IIS.

What I tried : - add repository of my exe to environnment path. - change user to administrator user - change user on IIS to be the same as IISEXPRESS ( same on pool application ) - add params CreateNoWindow = true LoadUserProfile = true on ProcessStartInfo Object - World Wide Web Publication service and management web service was set to : "Allow service to interact with desktop" - Launch a console app instead of my GUI exe from my website : it's working

Process.Start(@"myExe.exe"); ( the repo is added to environnement variable : work on iisesxpress)

return ExitCode = 0 on iis express ( success ) return ExitCode = -532462766 on iis ( fail)

I expect my website to correctly call my executable and return exitcode = 0.

Thanks everyone

  • https://blog.lextudio.com/web-application-differences-in-visual-studio-and-iis-60fec7e311b3 – Lex Li Aug 14 '19 at 13:41
  • Thanks, the link is really helpful. I already fix the user to my login on my IIS app to see if it's ok but not. I understand the Interface won't be visible when launched on IIS but the process is not launched either ( the code launch a GUI and modify some text file) – Serious Cat Aug 14 '19 at 14:42
  • Its hard to judge what you are try to execute as GUI, First of all you need to ensure the process got all the permission to run in server environment.For better understanding please let us know what is the role of GUI in this application. If its a job you can schedule with "Task Scheduler" – Ajay Peter Aug 14 '19 at 15:06
  • I just try with task scheduler and it's working. But task scheduler works on the same session as me – Serious Cat Aug 14 '19 at 15:20

0 Answers0