다음을 통해 공유


ASP.NET IIS Registration Tool

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

When multiple versions of the .NET Framework are executing side by side on a single computer, the ASP.NET ISAPI version that is scriptmapped 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 scriptmaps 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.

noteNote
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 scriptmaps at the IIS metabase root and below.

Note

Only the scriptmaps 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 scriptmaps. To install ASP.NET and update the scriptmaps, use the -i option.

-k path

Removes the scriptmaps to all versions of ASP.NET from all ASP.NET applications at the specified application root path and its subdirectories.

-kn path

Removes the scriptmaps 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 scriptmapped.

Note

The keys that inherit ASP.NET scriptmaps 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 scriptmaps in the IIS metabase and below to point to the ASP.NET ISAPI version associated with Aspnet_regiis.exe.

Note

All existing scriptmaps are updated to point to the ASP.NET ISAPI version associated with Aspnet_regiis.exe, regardless of the current version.

-s path

Installs the scriptmap 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 scriptmaps in the specified path and below that use an earlier version of the ASP.NET ISAPI are updated.

-sn path

Installs the scriptmap 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 scriptmaps in the specified path that use an earlier version of the ASP.NET ISAPI are updated. [[LEFT]] Note

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 scriptmaps 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 scriptmap 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. Because 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 scriptmaps 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 scriptmaps 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 scriptmap 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 scriptmaps of all existing ASP.NET applications. Use the -ir option to install ASP.NET without updating the scriptmaps. 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 scriptmapped, use the -lk option.

Client-side scripts, 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 about side-by-side execution in ASP.NET, see Side-by-Side Support in ASP.NET on MSDN. For more information about script maps and application root path, see Setting Application Mappings in IIS 6.0.

Examples

The following command installs the scriptmaps 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 scriptmaps 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 scriptmaps of all existing ASP.NET applications. Note that only applications that are currently scriptmapped 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 scriptmaps 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