다음을 통해 공유


Viewing the ASP.NET Version

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

The version of the Framework used by an ASP.NET application is determined by the version of the aspnet_isapi.dll file that is registered under the IIS script maps for that application. A script map is a three-way association of a file name extension, such as .aspx; an HTTP verb associated with a request, such as GET; and the DLL that contains instructions for what the Web server should do when it receives an HTTP request for a file with the specified file name extension. You can set these script maps to the application root directory itself, which is an IIS virtual directory, or allow them to be inherited from a parent application or site.

Procedures

To view script maps for file name extensions in your application

  1. From the Start menu, click Run, type inetmgr in the Open box, and then click OK.

  2. In IIS Manager, expand the local computer, expand Web Sites, expand Default Web Site, and then click the name of your application.

  3. Right-click the application name, and then click Properties.

  4. On the Directory tab, click Configuration. All the script maps associated with your application appear alphabetically by file name extension in the Application Mappings box.

Configuring Script Maps

ASP.NET provides a command-line tool, called the ASP.NET IIS Registration tool (Aspnet_regiis.exe), to make it easy to configure script maps for your applications. If you have multiple versions of ASP.NET installed on your Web server, a version of this tool is provided with each. You can use the tool associated with a particular version of ASP.NET to register your application with that version.

The -s and -sn commands included in Aspnet_regiis.exe install the current version to the specified path, included as an argument on the command line. The -s command installs the specified version of ASP.NET to the specified application root and all its virtual subdirectories. This command updates all existing script maps in the specified path and below that use an earlier version of the ASP.NET ISAPI. The -sn command installs the specified version of ASP.NET to the directory specified in the path argument only; it does not install the version to subdirectories. For example, the following entry on the command line creates a script map between the version of ASP.NET associated with the tool version and the SampleApp1 directory, along with all its subdirectories:

aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1

Aspnet_regiis.exe has other utility purposes as well, such as registering a version of ASP.NET (which includes registering the Aspnet_isapi.dll, setting up the state server, setting up the worker process account, and so on) and creating client script directories for that version of ASP.NET. It can also list all installed versions of ASP.NET and which applications use each version. For more information about this tool, see ASP.NET IIS Registration Tool.

For more information about running multiple ASP.NET applications on a server using different versions of the .NET Framework, see Side-by-Side Support in ASP.NET on MSDN.