HOW TO: Selectively Enable or Disable ASP.NET Functionality in IIS (815175)



The information in this article applies to:

  • Microsoft ASP.NET (included with the .NET Framework) 1.0
  • Microsoft Internet Information Server 5.0
  • Microsoft ASP.NET (included with the .NET Framework 1.1)

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.
  9. 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.
  8. For each extension mapping, click Browse and then select the Aspnet_isapi.dll file. Type the extension in the Extension field.
  9. In the Verbs dialog box, click Limit To and then type GET, HEAD, POST, DEBUG in the Limit To text box. Click OK.
  10. Click OK until you return to Internet Services Manager and then close Internet Services Manager.

back to the top

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

818016 HOW TO: Deploy Applications That Are Built on the .NET Framework

For more information about deploying applications, see the .NET Framework SDK documentation or visit the following Microsoft Web site:back to the top

Modification Type:MinorLast Reviewed:8/18/2003
Keywords:kbWebServices kbWebServer kbWebForms kbConfig kbHOWTOmaster KB815175 kbAudITPRO