Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have built a very simple Soap Web Server service using delphi as well as having installed IIS-7 on my local machine running Windows 7 Professional.

I placed my Soap executable file in the inetpub/wwwroot/ directory. When I go to the address "http://localhost/SoapAttempt.exe" my browser tries to download the file instead of running it.

I imagine I need to set something up in IIS. What do I need to do to get this to run instead of downloading?


I am following this tutorial and on the third page is where it instructs to compile the executable and place it in the directory. Then it says to open it from a web browser and upon doing that the tutorial shows it displaying a page with information about the soap server that you can use to build clients but all I get is it downloading the exe. So I am missing a step of something is not setup correctly.

NOTE: The tutorial says place the executable in the wwwroot/cgi-bin directory but I have tried both the above and this directory and both have the same outcome.

share|improve this question
up vote 1 down vote accepted

The Handler mapping for CGI-exe was disabled.

  • Go Into IISManager (search in start bar inetmgr)
  • Select the highest level in the left box
  • Double click on the Handler Mappings icon
  • Right click on the item in the disabled section called CGI-exe
  • Click Edit feature permissions
  • Make sure Execute is checked
  • Press Ok to get out of that screen and Presto Problem Solved


I'm having a different issue now but ill place it in the comments to this answer

share|improve this answer
I can almost run it now. I get this error when i do " HTTP Error 404.2 - Not Found The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server. " I have checked the restrictions and there are no entries in a denied state – Tim May 24 '11 at 12:50
To over come this I had to set the manager to allow unspecified CGI and ISAPI moduls. This is found under ISAPI and CGI restrictions then on the right under actions click on the edit feature settings – Tim May 24 '11 at 13:22

IIS will host web-services. If your delphi application is a self-contained web server, there is no need to place it inside a virtual directory in IIS. Instead, need to run the executable from the server, and then try to navigate to it through your browser.

If you have written an IIS extension/addon/plug-in you will need to look into how those are deployed.


From the link you provided:

Save all your project files in one directory, including the interface and implementation units. Then in the Delphi IDE go to Projects, then options, and then set the output directory to "X:inetpubwwwrootcgi-bin." "X" is for whatever drive name your web server root is located on. The cgi-bin directory is not automatically included in the webroot for those of us who run IIS, so create it and give it execute rights. We set the output directory to the cgi-bin directory because we won't have to copy our exe to the cgi-bin directory every time we make changes to our application. The exe will automatically be placed in that directory when we recompile it. Unlike most other web services, our web service does not need an Internet connection, but requires a web server.

Emphasis mine -- did you create that virtual directory under IIS? And did you chose Execute as a permission for that directory? (After you create the virtual directory, right click choose properties and poke around for an Execute Permissions field with a drop down list)

share|improve this answer
Thank you for your help thus far. I have edited the question above to give more information. I'll look into your answer more tomorrow. – Tim May 23 '11 at 19:57
Yes, I had created the folder and I had given execute permissions. – Tim May 24 '11 at 12:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .