(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

ASP.NET IIS Registration Tool (Aspnet_regiis.exe)

When multiple versions of the .NET Framework are executing side-by-side on a single computer, the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime is used for the application. The ASP.NET IIS Registration tool (Aspnet_regiis.exe) allows an administrator or installation program to easily update the script maps for an ASP.NET application to point to the ASP.NET ISAPI version associated with the tool. The tool can also be used to display the status of all installed versions of ASP. NET, register the ASP.NET version coupled with the tool, create client-script directories, and perform other configuration operations.

Aspnet_regiis [options]

You can specify one or more of the following options.

Option Description
-c Installs the client-side scripts for ASP.NET, such as client-side validation scripts, to the aspnet_client subdirectory of each IIS site directory.
Note   Only the client-side scripts for the ASP.NET version associated with Aspnet_regiis.exe are installed.
-e Removes the client-side scripts for ASP.NET from the aspnet_client subdirectory of each IIS site directory.
Note   Only the client-side scripts for the ASP.NET version associated with Aspnet_regiis.exe are removed.
-ea Removes the client-side scripts for all versions of ASP.NET from the Aspnet_client subdirectory of each IIS site directory.
-i Installs the version of ASP.NET associated with Aspnet_regiis.exe and updates the script maps at the IIS metabase root and below.
Note   Only the script maps for applications that use an earlier version of the ASP.NET are updated. Applications that use a later version are not affected.
-ir Installs the version of ASP.NET associated with Aspnet_regiis.exe and only registers ASP.NET in IIS.
Note   This option does not update the script maps. To install ASP.NET and update the script maps, use the -i option.
-k path Removes the script maps to all versions of ASP.NET from all ASP.NET applications at the specified application root path and its subdirectories.
-kn path Removes the script maps to all versions of ASP.NET from the ASP.NET application only at the specified application root path.
Note   This option does not affect applications in subdirectories of path.
-lk Lists the path and version of all IIS metabase keys where ASP.NET is mapped.
Note   The keys that inherit ASP.NET script maps from a parent key are not displayed.
-lv Lists the status and installation path of all versions of ASP.NET installed on the computer.
-r Updates all script maps in the IIS metabase and below to point to the ASP.NET ISAPI version associated with Aspnet_regiis.exe.
Note   All existing script maps are updated to point to the ASP.NET ISAPI version associated with Aspnet_regiis.exe, regardless of the current version.
-s path Installs the script map pointing to the ASP.NET ISAPI version associated with Aspnet_regiis.exe to all ASP.NET application at the specified application root path and its subdirectories. All existing script maps in the specified path and below that use an earlier version of the ASP.NET ISAPI are updated.
-sn path Installs the script map pointing to the ASP.NET ISAPI version associated with Aspnet_regiis.exe to the ASP.NET application at the specified application root path. All existing script maps in the specified path that use an earlier version of the ASP.NET ISAPI are updated.
Note   This option does not affect applications in subdirectories of path.
-u Uninstalls the version of ASP.NET associated with Aspnet_regiis.exe from the computer. Existing script maps to this version of the ASP.NET ISAPI are automatically remapped to the highest remaining ASP.NET ISAPI version installed.
-ua Uninstalls all versions of ASP.NET from the computer.
-? Displays the command syntax and options for the tool.

Remarks

When multiple versions of ASP.NET are installed on a computer, ASP.NET is said to be running side-by-side. In this setup, Internet Information Services (IIS) needs to know which version of the ASP.NET ISAPI (aspnet_isapi.dll) should process a page in an ASP.NET application. The ASP.NET ISAPI version associated with an ASP.NET application determines which version of the common language runtime is used for the application. An ASP.NET application is associated with an ASP.NET ISAPI version through a script map in IIS. To simplify the configuration process for an ASP.NET application, each version of ASP.NET comes with a linked version of Aspnet_regiis.exe.

Note   A unique version of Aspnet_regiis.exe is included with each version of the .NET Framework. Since each version of the tool is applicable only to its associated version of the .NET Framework, be sure to use the appropriate version of the tool to configure an ASP.NET application.

Aspnet_regiis.exe is commonly used with the -s or -sn option to remap an ASP.NET application to the version of the .NET Framework that is associated with the tool. Use the -s option to update the applications at the specified root path and in all its subdirectories. If you don't want applications in subdirectories to be updated, use the -sn option. To update the script maps of all existing ASP.NET applications on the computer at once, use the -r option.

Note   The path parameter refers to the root path of the application, not the physical path. For example, W3SVC/1/ROOT/SampleApp1.

Conversely, you can use the tool to remove the script maps to any version of ASP.NET from an application using the -k or -kn option and specifying the root path of the application.

Note   If the root path specified inherits its script map from a parent root path, the -k and -kn options will have no effect.

The 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 scripmaps 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 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 use Aspnet_regiis.exe to view information about ASP.NET. To list the status and installation path of all installed versions of ASP.NET, use the -lv option. If you would like to see the paths to all IIS metabase keys where ASP.NET is mapped, use the -lk option.

Client-side script, such as client-side validation, can be installed and removed using Aspnet_regiis.exe. To install the client-side script for the version of ASP.NET associated with the tool to the aspnet_client subdirectory of each IIS site directory, use the -c option. To remove the client-side script for just the ASP.NET version 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.

For more information on side-by-side execution in ASP.NET, see Side-by-Side Support in ASP.NET. For more information on script maps and application root path, see the IIS documentation (http://localhost/iishelp). Note that to view the IIS documentation, you must have IIS installed.

Examples

The following command installs the script maps pointing to the ASP.NET version associated with Aspnet_regiis.exe to the SampleApp1 application and all its sub-applications.

Aspnet_regiis -s W3SVC/1/ROOT/SampleApp1

The following command only updates the script maps for the SampleApp1 application, without affecting applications in subdirectories.

Aspnet_regiis -sn W3SVC/1/ROOT/SampleApp1

The following command installs the ASP.NET version associated with the tool and updates the script maps of all existing ASP.NET applications. Note that only applications that are currently mapped to an earlier version of ASP.NET are affected.

Aspnet_regiis -i

The following command installs the ASP.NET version associated with the tool, but does not update the script maps of existing ASP.NET applications

Aspnet_regiis -ir

The following command displays the status and installation path of all versions of ASP.NET installed on the computer.

Aspnet_regiis -lv

See Also

.NET Framework Tools | Side-by-Side Support in ASP.NET | Side-by-Side Execution

Anzeigen:
© 2014 Microsoft