ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
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:
|
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 (Aspnet_regiis.exe) is used to register ASP.NET applications with Internet Information Services (IIS). This topic describes the options, syntax, and other information for using the tool.
Using the ASP.NET IIS Registration tool, you can perform tasks such as the following:
Register or remove the .NET Framework ASP.NET installation with IIS.
Create new ASP.NET application pools.
Display the status of all installed versions of ASP.NET.
![]() |
---|
The version of Aspnet_regiis that is included with the .NET Framework version 4 has new features and capabilities, which are summarized in the Options section. However, these features are available only when you install the .NET Framework 4 on Windows Vista, Windows Server 2008, or Windows 7. If you install the .NET Framework version 4 on any version of Windows XP or Windows Server 2003, the tool works the same as in version 3.5 and earlier of the .NET Framework. For details about how Aspnet_regiis works on Windows XP or Windows Server 2003, see ASP.NET IIS Registration Tool for the .NET Framework Version 3.5. |
The .NET Framework 4 can be installed side-by-side with previous versions of the .NET Framework on a single computer. If IIS was previously enabled on the computer, the setup process for the .NET Framework automatically registers ASP.NET 4 with IIS. However, if you install the .NET Framework 4 before you enable IIS, you must run the ASP.NET IIS Registration tool in order to register the .NET Framework with IIS and create application pools that use the .NET Framework 4.
![]() |
---|
For information about how to find the correct version of Aspnet_regiis.exe, see Finding the Correct Version of Aspnet_regiis.exe later in this document. |
aspnet_regiis [options]
Options
The i, ir, iru and enable options are typically the only options that you require in order to register ASP.NET applications with IIS.
Option |
Description |
---|---|
-c |
Legacy option that does not apply when you run applications under ASP.NET version 4. For information about how this option works with previous versions of ASP.NET, see ASP.NET IIS Registration Tool for the .NET Framework Version 3.5. |
-disable |
On IIS 6.0 and on IIS 7.0 running in Classic mode, disables the ASP.NET ISAPI extension. The command does not apply to IIS 7.0 in Integrated mode. This option can be combined only with the -i, -ir, or -r options. It is not available with IIS versions earlier than IIS 6.0. |
-e |
Removes the client scripts for ASP.NET from the aspnet_client subdirectory of each IIS site directory. Only the client scripts for the ASP.NET version that is associated with Aspnet_regiis.exe are removed. |
-ea |
Removes the client scripts for all versions of ASP.NET from the aspnet_client subdirectory of each IIS site directory. |
-enable |
On IIS 6.0 and on IIS 7.0 in Classic mode, option enables the ASP.NET ISAPI extension. The command does not apply to IIS 7.0 in Integrated mode. This option can be combined only with the -i, -ir, or -r options. It is not available with IIS versions earlier than IIS 6.0 or with ASP.NET versions earlier than ASP.NET version 2.0. |
-ga user |
Grants the specified user or group access to the IIS metabase and other directories that are used by ASP.NET. You typically use this option when you are creating a custom service account. For more information, see How to: Create a Service Account for an ASP.NET 2.0 Application. This option is not available with ASP.NET versions earlier than ASP.NET 2.0. For installations on Windows Vista, Windows Server 2008, or Windows 7, this option enables you to set ACLs for groups. ![]() The version of Aspnet_regiis.exe that is provided in ASP.NET versions 3.5 and earlier fails when specifying a local user or group.
|
-i |
Installs ASP.NET 4 and updates existing applications to use the ASP.NET 4 version of the application pool. It updates both the IIS Classic mode and the IIS Integrated mode handler and script mappings in the IIS metabase. This option creates two application pools, ASP.NET v4.0 and ASP.NET v4.0 Classic. The DefaultAppPool application pool and theClassic .NET AppPool application pools are set to the .NET Framework 4 version of the CLR. The 32-bit version of Aspnet_regiis.exe adds only 32-bit scriptmaps to the Applicationhost.config file. The 64-bit version of Aspnet_regiis.exe adds 32-bit and 64-bit scriptmaps to the Applicationhost.config file. This is done because 64-bit versions of Windows Vista, Windows Server 2008, or Windows 7 installations that have IIS 7.0 enabled will also have Windows on Windows 64-bit (WOW64) support available. ![]() In the Windows Features dialog box of the operating system, the option for ASP.NET integration is not selected. (This option is in the Internet Information Services section.) The Windows Features dialog box displays only the status of ASP.NET 2.0 integration. It does not display information about version 4.
|
-ir |
Installs and registers ASP.NET 4. This option is the same as the -i option except that this option does not change the CLR version that is associated with any existing application pools. |
-iru |
If ASP.NET is not currently registered with IIS, performs the tasks described for -i. If a previous version of ASP.NET is already registered with IIS, this option performs the tasks described for -ir. |
-k path |
This option is not supported under Windows Vista, Windows Server 2008, or Windows 7. For information about how this option works when you run under Windows XP or Windows Server 2003, see ASP.NET IIS Registration Tool for the .NET Framework Version 3.5. |
-kn path |
This option is not supported under Windows Vista, Windows Server 2008, or Windows 7. For information about how this option works when you run under Windows XP or Windows Server 2003, see ASP.NET IIS Registration Tool for the .NET Framework Version 3.5. |
-lk |
Lists the path and version of all IIS metabase keys where ASP.NET is mapped. This option is not supported on Windows Vista and later versions. 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 that are installed on the computer. |
-norestart |
This option is not supported under Windows Vista, Windows Server 2008, or Windows 7. For information about how this option works when you run under Windows XP or Windows Server 2003, see ASP.NET IIS Registration Tool for the .NET Framework Version 3.5. |
-r |
Performs the tasks described for -i and in addition switches all application pools to use the .NET Framework 4 CLR. |
-s path |
Updates scriptmaps and application-pool assignments for the specified application and for all sub-applications. For a non-root Web application (not W3SVC\ or W3SVC\ROOT), the application pool settings for the non-root Web application and all its sub-applications are copied to a new application pool named ASP.NET V4.0 original application pool name, and the non-root Web application is then moved to the new application pool. The new application pool has the same settings as the original application pool, except that the copy is mapped to the .NET Framework 4 CLR and has ASP.NET 4 settings. If the new application pool ASP.NET V4.0 original application pool name already exists, the step of creating and cloning the application pool is skipped. Instead, Aspnet_regiis.exe uses the existing application pool and sets it to use the .NET Framework 4 CLR, but makes no other changes. The tool then moves the specified application and its sub-applications to the corresponding application-pool copy. Existing application-pool settings are left unchanged. If the specified application is the Web root (W3SVC\ or W3SVC\ROOT), Aspnet_regiis.exe updates all application pools to use the .NET Framework 4 CLR and ASP.NET 4. |
-sn path |
Performs the tasks described for -s, except that -sn is not recursive. Updates scriptmaps and application-pool assignments for only the specific application. No sub-applications are changed. If the specified application is the Web root (W3SVC\ or W3SVC\ROOT), Aspnet_regiis.exe changes the application pools named DefaultAppPool,Classic .NET AppPool, ASP.NET V4.0, and ASP.NET V4.0 Classic" to use the .NET Framework 4 CLR and ASP.NET 4. |
-u |
For uninstallation, leaves the two 4 versions of the application pools, leaves any applications that were in the two version 4 application pools. This option also removes the managedRuntimeVersion attribute of application pools that were mapped to the .NET Framework 4 CLR. This reverts the application pools to the IIS 7.0 default value for the runtime, which is 2.0 on Windows Vista, Windows Server 2008, or Windows 7. The option removes all explicitly set version 4 handler and module mappings. It also removes all scriptmaps (32-bit and 64-bit), regardless of whether the 32-bit or 64-bit version of Aspnet_regiis.exe is used. |
-ua |
For uninstallation, leaves the two 4 versions of the application pools, and leaves any applications that were in the two version 4 application pools. This option removes all ASP.NET registrations (both versions 2.0 and 4) from the Applicationhost.config file. It also removes all scriptmaps (32-bit and 64-bit), regardless of whether the 32-bit or 64-bit version of Aspnet_regiis.exe is used. Existing application pools will still be associated with the .NET Framework 2.0, because that is the default value for the managedRuntimeVersionattribute. |
-? |
Displays the command syntax and options for the ASP.NET IIS Registration tool. |
Configuration Options
Option |
Description |
---|---|
-config+ |
Enables remote access to ASP.NET configuration. |
-config- |
Disables remote access to ASP.NET configuration. |
-pa container account |
Grants permission for the specified user or group account to access the specified key container. This option can take the following modifiers:
|
-pc container |
Creates an RSA public/private key pair in the specified container. This option can take the following modifiers:
|
-pd section |
Decrypts the configuration section. This argument can take the following parameters:
|
-pdf sectionwebApplicationDirectory |
Decrypts the specified configuration section of the Web.config file in the specified physical (not virtual) directory. |
-pe section |
Encrypts the specified configuration section. This option can take the following modifiers:
|
-pef section webApplicationDirectory |
Encrypts the specified configuration section of the Web.config file in the specified physical (not virtual) directory. |
-pi container file |
Imports an RSA public/private key pair to the specified container from the specified XML file. This option can take the following modifiers:
|
-pr container account |
Removes permission for the specified user or group account to access the specified key container. This option can take the following modifiers:
|
-px container file |
Exports an RSA public/private key pair from the specified container to the specified XML file. This option can take the following modifiers:
|
-pz container |
Deletes the specified key container. This option can take the following modifier:
|
Remarks
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:
|
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.
![]() |
---|
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.
Examples
The following command installs the ASP.NET version that is associated with the version of the ASP.NET IIS Registration tool that you are using, and updates existing ASP.NET applications. On IIS 6.0, the command updates the scriptmaps of existing ASP.NET applications that are currently mapped to an earlier version of ASP.NET. On IIS 7.0, the command updates both classic mode and integrated mode handlers in the IIS metabase. It also switches the DefaultAppPool and theClassic .NET AppPool applications pools to use the .NET Framework 4 CLR.
aspnet_regiis -i
The following command installs the ASP.NET version that is associated with the tool without updating existing applications. On IIS 7.0, the command does not update the version of the .NET Framework associated with the DefaultAppPool and Classic .NET AppPool application pools.
aspnet_regiis -ir
The following command displays the status and installation path of all versions of ASP.NET that are installed on the computer.
aspnet_regiis -lv
The following command updates a Web application and all of its sub-applications to use the ASP.NET version that is associated with the tool. On IIS 6.0, the scriptmaps are updated. On IIS 7.0, the application is mapped to a new application pool.
aspnet_regiis -s W3SVC/1/ROOT/SampleApp1
The following command performs the same functions as the -s command, except that it does not affect applications in subdirectories.
aspnet_regiis -sn W3SVC/1/ROOT/SampleApp1
The following command grants the specified user or group accounts access to the IIS metabase and the other directories used by ASP.NET.
aspnet_regiis -ga MyUserGroup W3SVC/1/ROOT/SampleApp1
Finding the Correct Version of Aspnet_regiis.exe
Aspnet_regiis.exe is installed in the Microsoft.NET Framework directory. If the computer is running multiple .NET Framework versions side-by-side, multiple versions of the tool might be installed. The following table lists the locations where the tool is installed for different versions of the .NET Framework.
Version of .NET Framework |
Location of Aspnet_regiis.exe file |
---|---|
.NET Framework version 1 |
%windir%\.NET\Framework\v1.0.3705 |
.NET Framework version 1.1 |
%windir%\Microsoft.NET\Framework\v1.1.4322 |
.NET Framework version 2.0, version 3.0, and version 3.5 (32-bit systems) |
%windir%\Microsoft.NET\Framework\v2.0.50727 |
.NET Framework version 2.0, version 3.0, and version 3.5 (64-bit systems) |
%windir%\Microsoft.NET\Framework64\v2.0.50727 |
.NET Framework version 4 (32-bit systems) |
%windir%\Microsoft.NET\Framework\v4.0.30319 |
.NET Framework version 4 (64-bit systems) |
%windir%\Microsoft.NET\Framework64\v4.0.30319 |
Directories for the .NET Framework versions 3.0 and 3.5 do not have a copy of the tool. For more information, see the entry How to set an IIS Application or AppPool to use ASP.NET 3.5 rather than 2.0 on Scott Hanselman's blog.
ASP.NET IIS Registration Tool (Aspnet_regiis.exe)的更多相关文章
- 采用ASP.NET IIS 注册工具 (Aspnet_regiis.exe)对web.config实行本地加密
加密原因:我们通常将一些重要的配置信息写在Web.config里面,其中数据库链接就是这样的信息.将这些数据直接明文显示,显然不太安全. 工具: 采用ASP.NET IIS 注册工具 (Aspnet_ ...
- 使用ASP.NET注册工具aspnet_regiis.exe注册IIS
该工具的名称为aspnet_regiis.exe,在32位机上,该工具存在于C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727,在64位机中“Framework ...
- POC - ASP.NET & IIS 部分
终于得到了我VM的管理员权限啦啦.接下来不需要把IIS架在我自己的电脑上了,将架在我的VM上. 1. 先添加ISAP和CGI的组件. 2. 将defaultAppPool的MODE设为CLASSIC, ...
- aspnet_regiis.exe 的用法
使用aspnet_regiis.exe注册.NET Framework 重新安装IIS以后,需要用aspnet_regiis.exe来注册.NET Framework, 如下: C:\WINDOWS\ ...
- aspnet_regiis.exe -i 执行报错
IIS刚部署时出现问题 处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler” 按照网上的步骤,使用管理员打开CMD 开始->所有程 ...
- 配置asp.net IIS服务器遇到的问题以及详细图例解决方案
原来配置过IIS服务,但是没有将自己的程序放在IIS服务器上,今天突发奇想,看看自己写的程序怎么样啊,能否在服务器上运行一下,说干就干,但是遇到了很多困难,今天把陪孩子过程以及遇到的问题给大家说说,希 ...
- 使用aspnet_regiis.exe重新注册.NET Framework
cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 aspnet_regiis.exe -i 重新安装IIS以后,需要用aspnet_re ...
- iis 管理员执行 aspnet_iis.exe
如果我们在注册iis的时候,出现上图的问题,我们需要在桌面上新建一个快捷方式 然后在目标处添上我们的命令. 比如:C:\Windows\Microsoft.NET\Framework\v4.0.303 ...
- 命令行工具aspnet_regiis.exe实现加密和解密web.config
命令行工具aspnet_regiis.exe,是一个类似于DOS的命令工具,称之为命令解释器.使用命令行工具加密和解密web.config文件中的数据库连接字符串时,只需要简单的语法命令即可. 加密语 ...
随机推荐
- LOJ.6282.数列分块入门6(块状链表/分块)
题目链接 1.分块(vector)+重构 //直接上vector(本机还是比较慢的...) 某块size较大时O(n)重构 //注意细节 #include <cmath> #include ...
- [HihoCoder1393]网络流三·二分图多重匹配
题目大意: 班级有$N$名学生,运动会有$M$项不同的比赛,第$i$项比赛每个班需要派出$m_i$名选手参加,编号为i的学生最多同时参加给定的$b_i$项比赛中的任意$a_i$项比赛.根据统计的结果, ...
- [原创]DevOps 的技术栈和工具
[原创]DevOps 的技术栈和工具 版本控制:GitHub.GitLab.SubVersion 自动化构建和测试:Maven .Selenium.JMeter.Gradle 持续集成&交付: ...
- 初识zookeeper(1)之zookeeper的安装及配置
初识zookeeper(一)之zookeeper的安装及配置 1.简要介绍 zookeeper是一个分布式的应用程序协调服务,是Hadoop和Hbase的重要组件,是一个树型的目录服务,支持变更推送. ...
- 在AngularJS中实现一个延迟加载的Directive
所谓的延迟加载通常是:直到用户交互时才加载.如何实现延迟加载呢? 需要搞清楚三个方面: 1.html元素的哪个属性需要延迟加载?2.需要对数据源的哪个字段进行延迟加载?3.通过什么事件来触发延迟加载? ...
- Web App 和 Native App,哪个是趋势?
一.Web App vs. Native App 比起手机App,网站有一些明显的优点. 跨平台:所有系统都能运行 免安装:打开浏览器,就能使用 快速部署:升级只需在服务器更新代码 超链接:可以与其他 ...
- .Net AppDomain详解(二)
AppDomain 类 表示应用程序域,它是一个应用程序在其中执行的独立环境. 此类不能被继承. 命名空间: System程序集: mscorlib(位于 mscorlib.dll) 继承层次结 ...
- Java 下一代: 函数式编码风格——Groovy、Scala 和 Clojure 共享的函数结构及其优势
原文地址 本文内容 命令式处理 函数式处理 函数式编程的优势 所有 Java 下一代语言都包括函数式编程结构,让您可以从一个更高的抽象层面来思考问题.然而,语言间术语的不同使得难以看到类似的结构.本期 ...
- 关于Python ,requests的小技巧
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/xie_0723/article/details/52790786 关于 Python Request ...
- XMAL定义后台数据
头部调用程序集xmlns:sys="clr-namespace:System;assembly=mscorlib" <Window.Resources><!--定 ...