Click here to Skip to main content
15,887,347 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am running exe file through process creation, it is working fine in source code, but not in IIS. How to call exe file in IIS ?
Posted
Comments
ZurdoDev 24-Feb-12 7:43am    
IIS is a host for web applications. So, you need to create an app that can be hosted in IIS. Please provide more details.
Philippe Mori 24-Feb-12 8:20am    
Are you using your own server or an hosted solution. In the later case, for sure you cannot run an executable as it would be far to dangerous for ISP to allows such code to execute.

Its an IIS security thing. The web applicaion on IIS has to be configured to be able to run executables. If that's not possible, try it this way:

0) Make your web site write a file that indicates the process needs to be run.

1) Write a Windows ervice that runs on the web server that watches for the file that your web site creates. When it sees that the file is created, have it run the executable.

The only caveat to this approach is that the executable run by the web service must be a console application with no GUI or user interaction.
 
Share this answer
 
v2
It is probably due to IIS running in "Session0" and not allowing any UI to be utilized.

(if you didn't do that already in the last 10 years :)
you can see more info and ways to resolve @ c# - Run a process/URI from IIS in a desktop session - Stack Overflow[^]
 
Share this answer
 
Comments
OriginalGriff 1-Jul-21 1:42am    
While I applaud your urge to help people, it's a good idea to stick to new questions, rather than 9 year old ones. After that amount of time, it's unlikely that the original poster is at all interested in the problem any more!
Answering old questions can be seen as rep-point hunting, which is a form of site abuse. The more trigger happy amongst us will start the process of banning you from the site if you aren't careful. Stick to new questions and you'll be fine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900