How To: Prevent running ASP / ASP.NET code in specific folder
Sometimes, you may want to prevent running ASP or ASP.NET code in specific folder, for security reasons for example.
In this case, you have to follow these instructions (Windows Server 2003, IIS6):
- run inetmgr, the IIS management console
- Right-Click on the folder you want to disable ASP/ASP.NET inside
- Open the properties window.
- In the "Directory" tab, in the "Execute Premissions list, choose "None". Now, It's impossible to execute ASP files or CGI scripts in this folder.
- Make an application for this folder, by clicking "Create" button.
- Click on the "Configuration" button.
- In the "Wildcard application maps" section, choose the aspnet_isapi.dll item, and click Removee.
That's it!
Now, it's impossible to execute ASP or ASP.NET code on this folder.
Shahar.