When multiple versions of ASP.NET are installed on a computer, the versions of ASP.NET are said to be running
side-by-side. In this scenario, you must configure IIS to indicate which version of the ASP.NET ISAPI (aspnet_isapi.dll) should process a page in an ASP.NET application. In IIS 7.0, in both Classic and Integrated mode, the CLR version set for the application pool determines which version of ASP.NET and which associated version of the CLR are used to run an application. In IIS 6.0, a scriptmap is used to associate an application with a specific ASP.NET ISAPI version, and the ISAPI version in turn determines which version of the CLR is used to run the application.
There are 32-bit and 64-bit versions of Aspnet_regiis.exe. For Windows Vista and Windows Server 2008, you can run the 32-bit version of the tool on a 64-bit installation of IIS. This lets you run mixed 32-bit and 64-bit worker processes on the same 64-bit system. The following table lists special cases and limitations that apply when you run the 32-bit version of the tool on a 64-bit version of IIS.
IIS Version | Special cases for 32-bit versions of Aspnet_regiis.exe |
6.0 | You can run the 32-bit version of Aspnet_regiis.exe under a 64-bit IIS 6.0 installation on Windows Server 2003 with the following restrictions:
- The 32-bit version runs only if IIS has been set to run in 32-bit mode.
- The 64-bit version runs only if IIS has been set to run in 64-bit mode.
|
7.0 | On Windows Vista, Windows Server 2008, or Windows 7, when you run the 32-bit version of Aspnet_regiis.exe under IIS 7, the tool does not automatically set the enable32BitAppOnWin64 attribute of the applicationPools element. On a default 64-bit operating system installation, with Windows on Windows 64 enabled, you can use 32-bit Aspnet_regiis.exe to configure IIS 7, but you will not be able to run any 32-bit applications, unless you explicitly change the enable32BitAppOnWin64 attribute to enable running the application in Windows on Windows 64. For more information about IIS 7.0 configuration options, see the documentation for the applicationPools element in the Applicationhost.config file. |
The ASP.NET IIS Registration tool is commonly used with the
-s or
-sn option to remap an ASP.NET application to the version of the .NET Framework that it is associated with. Use the
-s option to update an application at the specified root path and in all of its subdirectories. If you do not want applications in subdirectories to be updated, use the
-sn option.
Note |
The path parameter refers to the root path of the application, not the physical path. For example, W3SVC/1/ROOT/SampleApp1. |
You can also use the ASP.NET IIS Registration tool to view information about ASP.NET. To list the status and installation path of all of the versions of ASP.NET that are installed on your computer, use the
-lv option.
The
-norestart option prevents a restart of the World Wide Web Publishing Service after ASP.NET script maps are installed or updated. If you are running multiple Web sites in IIS and they are in various application pools, and if you do not want all of them to be restarted, use this option.
Any changes made using the
ASP.NET tab on the Internet Information Service console application also cause all application pools to be recycled. If you want to change the ASP.NET version that an application uses without causing all application pools to be recycled, run the following two commands to change the version.
aspnet_regiis -s w3svc/<instance>/root -norestart
iisapp /a <app pool> /r
The ASP.NET IIS Registration tool can also be used to install and uninstall the linked version of ASP.NET. Use the
-i option to install ASP.NET and to update the script maps of all existing ASP.NET applications. Use the
-ir option to install ASP.NET without updating the script maps. To uninstall the ASP.NET version that is associated with the tool, use the
-u option. If you want to uninstall all versions of ASP.NET from the computer, use the
-ua option.
You can also use the ASP.NET IIS Registration tool to view information about ASP.NET. To list the status and installation path of all of the versions of ASP.NET that are installed on your computer, use the
-lv option. If you want to see the paths to all of the IIS metabase keys where ASP.NET is mapped, use the
-lk option.
You can use Aspnet_regiis.exe to install and remove system client-side script, such as script for client-side validation. Use the
-c option to install client script for the version of ASP.NET that is associated with the tool. (Script is installed in the Aspnet_client subdirectory of each IIS site directory.) To remove the client-side script for just the ASP.NET version that is associated with the tool, use the
-e option. To remove the client-side script for all installed versions of ASP.NET, use the
-ea option.
When you are using impersonation and if the impersonation account does not have Read access to the IIS metabase, a
COMException exception with the message "Access is denied" is thrown when you try to access
DirectoryEntry. This can occur when the Code subdirectory of the application exists in the application root directory. This error can also occur when an application is mapped to a UNC share and the UNC account does not have Read access to the metabase. In both cases, running the ASP.NET IIS Registration tool with the
-ga user option for the impersonation or UNC account fixes the issue.
For more information about scriptmaps and application root paths, see the
IIS documentation on the Microsoft Web site.