Microsoft KB Archive/815175

= HOW TO: Selectively Enable or Disable ASP.NET Functionality in IIS =

Article ID: 815175

Article Last Modified on 5/13/2007

-

APPLIES TO


 * Microsoft ASP.NET 1.0
 * Microsoft Internet Information Services 5.0
 * Microsoft ASP.NET 1.1

-



IN THIS TASK

 * SUMMARY
 * Disable ASP.NET Functionality for a Virtual Server
 * Enable ASP.NET Functionality for a Virtual Server
 * REFERENCES



SUMMARY
This article describes how to selectively enable or disable ASP.NET functionality in IIS. When the .NET Framework is installed on a computer that has IIS installed, IIS is automatically configured to forward several types of requests to ASP.NET. You can change this default behavior by selectively enabling or disabling ASP.NET functionality for virtual servers, for virtual directories, or for folders.

back to the top

Disable ASP.NET Functionality for a Virtual Server
The following section describes how to disable ASP.NET functionality for all of an IIS virtual server.
 * 1) On the taskbar, click start. Point to Settings and then click Control Panel.
 * 2) Double-click to open the Administrative Tools folder and then double-click to run Internet Services Manager.
 * 3) Right-click the virtual server or the virtual folder and then click Properties.
 * 4) Select the Home Directory tab or the Directory tab.
 * 5) If an application has not been created for the virtual folder, click Create under Application Settings.
 * 6) Under Application Settings, click Configuration.
 * 7) On the Application Mappings tab, scroll through the Application Mappings list to identify the extensions that are associated with the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\Aspnet_isapi.dll.
 * 8) Select each extension that is associated with Aspnet_isapi.dll and then click Remove.

By default, the extensions that are associated with Aspnet_isapi.dll are: .ASAX, .ASCX, .ASHX, .ASMX, .ASPX, .AXD, .VSDISCO, .REM, .SOAP, .CONFIG, .CS, .CSPROJ, .VB, .VBPROJ, .WEBINFO, .LICX, .RESX, and .RESOURCES.
 * 1) Click OK until you return to Internet Services Manager and then close Internet Services Manager.

Note If you remove the application mappings that are associated with ASP.NET, this makes ASP.NET not available for a virtual server. Any files that are typically associated with the standard ASP.NET file extensions will not be processed by the Web server when requested by a client. The files are sent directly to the client. When you store ASP.NET files on a virtual server with ASP.NET disabled, clients may be able to view source code and to view configuration information.

back to the top

Enable ASP.NET Functionality for a Virtual Server
By default, ASP.NET functionality is enabled for IIS virtual servers after the .NET Framework is installed. However, if you disable ASP.NET, you may want to reenable it. Or, you may want to enable ASP.NET for a virtual folder on a virtual server that has ASP.NET disabled. To enable ASP.NET functionality, follow these steps:
 * 1) On the taskbar click start. Point to Settings and then click Control Panel.
 * 2) Double-click to open the Administrative Tools folder and then double-click Internet Services Manager.
 * 3) Right-click the virtual server or the virtual folder and then select Properties.
 * 4) Select the Home Directory tab or the Directory tab.
 * 5) If an application has not been created for the virtual folder, click Create under Application Settings.
 * 6) Under Application Settings, click Configuration.
 * 7) Click Add to add an application extension mapping.

By default, ASP.NET associates 18 extension mappings with the %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\Aspnet_isapi.dll file. These extensions are: .ASAX, .ASCX, .ASHX, .ASMX, .ASPX, .AXD, .VSDISCO, .REM, .SOAP, .CONFIG, .CS, .CSPROJ, .VB, .VBPROJ, .WEBINFO, .LICX, .RESX, and .RESOURCES.
 * 1) For each extension mapping, click Browse and then select the Aspnet_isapi.dll file. Type the extension in the Extension field.
 * 2) In the Verbs dialog box, click Limit To and then type GET, HEAD, POST, DEBUG in the Limit To text box. Click OK.
 * 3) Click OK until you return to Internet Services Manager and then close Internet Services Manager.

back to the top

