1

I've created several IIS websites in my life, but some days ago a friend of mine asked me to host his website, so I created a folder within inetpub/wwwroot to store it.

Then, I created a virtual directory in my Default Web Site(the folder appears there as it's on wwwroot) and created the application, and allowed scripts & executables permissions. Also, I've set up the proper document types the website will have(default.aspx, asp, etc) and the folder has all the permissions i usually grant: iusr, iwmp, asp.net, network, etc.

When I reset IIS services and then look at the website(I've added the headers too) I get the following error:

You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

I've been searching for a while on internet and the only thing I found is to allow Executables to my website, which I've already done.

But, when I deleted the asp.net pages and I only add an html file, it will display on the browser.

Does anyone have any clue about this?

1
  • What version of IIS are you running?
    – Andrew
    Feb 8, 2010 at 14:52

5 Answers 5

1

Go into Web Server Extensions folder under IIS manager and make sure you have allowed asp.net 2.0 apps to run

1
  • Its allowed. This website is running under 3.5 framework though. Do I have to add it to the web server extensions too? In that case, which dll file do I have to add? Feb 8, 2010 at 15:03
1

Your IUSR account needs read/write permissions on the directory you created.

1
  • @Matt - If the wrong NTFS permissions were set for the anonymous user account you'd get a popup in the browser asking for credentials.
    – Kev
    Feb 8, 2010 at 15:40
0

The error you're getting definitely means that your script Execute Permissions are incorrect. In IIS Manager, go back to the folder in question and double check the setting on the Directory tab of the folder/virtual directory in question.

You should also try this with a classic ASP script (with just <% Response.Write "Hello" %> in the file) just to make sure, but I'm sure the result will be the same.

If you're still having problems, open the IIS metabase (in C:\WINDOWS\system32\inetsrv\metabase.xml) and locate the folder in question. To do this, search for (assuming that you put the site under the Default Web Site) the following string:

Location ="/LM/W3SVC/1/ROOT"

This should locate the IIsWebVirtualDir for the root of the Default Web Site. It'll look like this:

<IIsWebVirtualDir Location ="/LM/W3SVC/1/ROOT"`
  AccessFlags="AccessRead | AccessScript"
  AppFriendlyName="Default Application"
     ...other attributes...
  >
</IIsWebVirtualDir>

Scroll down a bit until you find a location path that matches the folder you put your friends website into e.g.

Location ="/LM/W3SVC/1/ROOT/JoesSite"

When you've found this, take a look at the AccessFlags attribute, it should look like:

AccessFlags="AccessRead | AccessScript"

Tell us what you see on that metabase node.

-1

Well, as it's a website and not a web application, it seems that it didn't work as a virtual directory, but it did as a IIS website.

Thank you.

Brian

-1

open iis. then select application pool in the left pane .select the specified site in the pool.right click and open advanced setting and then change the .NET version as required

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.