I have this: img src="/cgi-bin/simple.gif" > which works, and displays the image ok on client And I have this: img src="/cgi-bin/webapp.exe" > which does not work, after messing 2 days with permisions in IIS7. The EXE file just "dumps" a binary GIF file to console if I run it directly on the server (win7). But it displays nothing (broken picture) on the client browser. The web server seems not to run my exe. How to configure IIS7 to do it? step by step please.(i am novice to it) Thanks
Asked
Active
Viewed 240 times
1 Answers
0
If you want to execute the exe file in IIS, you can use the asp.net application. Use System.Diagnostics.Process's start method to run the exe.
The exe should inside the server and the application pool should have the permission to access the exe.
Here are the sample code
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_click(object sender,EventArgs e)
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
info.Arguments = "";
info.WindowStyle = ProcessWindowStyle.Normal;
Process pro = Process.Start(info);
pro.WaitForExit();
}
If you can test it in IIS Express, but cannot call it when deployed to IIS, it is a permission problem of the application pool. The application pool needs to be assigned FullControl permissions. For detailed operation, please refer to this answer.

Bruce Zhang
- 2,880
- 1
- 5
- 11
-
I had such a "src=app.exe" tag in an older IIS (winNT4) and it worked perfect. I am sure, it must work on IIS7 also. but don't know how. Thanks anyways. I will check your link, – gikam Oct 22 '20 at 09:29
-
1If my answer is helpful to you, you can mark it so that it can help others with similar problems. – Bruce Zhang Oct 28 '20 at 07:36