Microsoft KB Archive/815155

= How to configure URLScan to protect ASP.NET Web applications =

Article ID: 815155

Article Last Modified on 5/5/2006

-

APPLIES TO


 * Microsoft ASP.NET 1.0
 * Microsoft Internet Information Services 5.1
 * Microsoft Internet Information Services 5.0
 * Microsoft Internet Information Server 4.0
 * Microsoft ASP.NET 1.1

-



We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



IN THIS TASK

 * SUMMARY
 * Configure URLScan
 * REFERENCES



SUMMARY
This step-by-step article describes how to configure the URLScan security tool to protect ASP.NET Web applications.

URLScan is an Internet Server API (ISAPI) filter that screens and monitors HTTP requests for Internet Information Server 4.0, Internet Information Services 5.0, and Internet Information Services 5.1 (IIS). URLScan is used to reduce the exposure of IIS to potential Internet attacks.

By default, URLScan does not make special accommodations for file name extensions that ASP.NET Web applications use. You can change the URLScan configuration to add an extra layer of security for these applications. You must disable or enable different file name extensions for application level tracing, XML Web services, and remoting.

back to the top

Configure URLScan
To configure URLScan to enable standard ASP.NET file name extensions that users may requested, follow these steps:  Install the URLScan tool. For information and instructions, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/tools/urlscan.mspx

 Open the Urlscan.ini file in a text editor (such as Notepad). This file is located in the \ \System32\Inetsrv\Urlscan\ folder. In the [AllowExtensions] section, add the following file name extensions:  .ashx .aspx  In the [DenyExtensions] section, add the following file name extensions:  .asax</li> .ascx</li> .config</li> .cs</li> .csproj</li> .dll</li> .licx</li> .pdb</li> .resx</li> .resources</li> .vb</li> .vbproj</li> .vsdisco</li> .webinfo</li> <li>.xsd</li> <li>.xsx</li></ul> </li> <li>To turn on application level tracing, add the .axd file name extension to the [AllowExtensions] section. If you do not want to turn on application level tracing, add .axd to the [DenyExtensions] section.</li> <li>To allow Web services, add the .asmx file name extension to the [AllowExtensions] section. If you do not want to allow Web services, add .asmx to the [DenyExtensions] section.</li> <li>To turn on remoting, add the .rem file name extension and the .soap file name extension to the [AllowExtensions] section. If you do not want to turn on remoting, add .rem and .soap to the [DenyExtensions] section.</li> <li>Save and then close the Urlscan.ini file. You must restart IIS for the changes to take effect.</li></ol>

Note These steps are designed to offer optimal protection, regardless of whether the UseAllowVerbs setting is turned on in URLScan.

back to the top

<div class="references_section">