What does aspnet_regiis.exe do

2019-03-15 07:20发布

问题:

What does aspnet_regiis.exe do exactly other than updating the document mappings to correct aspnet_isapi.dll version, is updating the ASP.NET version from inetmgr same as running aspnet_regiis, I could not find any blog post or article describing the steps this particular batch command does. Please give any links you know of detailing the steps of aspnet_regiis.exe

回答1:

From MSDN reference:

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 (CLR) 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 that is 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 that is coupled with the tool, create client-script directories, and perform other configuration operations.

From Scott Forsyth's blog:

Starting in the first version of ASP.NET, Microsoft has provided a tool to control which version of the framework is registered in IIS. This tool, aspnet_regiis.exe, is quite flexible and with the right understanding of how IIS and ASP.NET work, can be used for most any situation.



回答2:

My favorite feature of it, is the ability to encrypt settings in web.config something along the lines of:

aspnet_regiis -pe /myapprootvirtualdirector

and decrypt is -pd

encrypt only after deployment to the server - as encrypting on one machine won't be valid on the other unless you share machine keys.



回答3:

It can also repair an install of aspnet.

Sometimes it just breaks and you need to run aspnet_regiis -i or -ir to fix it.



回答4:

It reg isters ASPNET extensions with IIS.



回答5:

Please give any links you know of detailing the steps of aspnet_regiis.exe

aspnet_regiis.exe -h generates the following helpful information about how the utility works internally.

Microsoft (R) ASP.NET RegIIS version 4.0.30319.18408
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.


                       -- ASP.NET REGISTRATION OPTIONS --


-i                  Install this version of ASP.NET and update IIS
                    configuration at the root level to use this version of
                    ASP.Net.



-ir                 Install this version of ASP.NET, register only. Do not
                    change any web applications to use this version.



-iru                Install this version of ASP.NET. If there are any existing
                    applications that uses ASP.NET, it will not change IIS
                    configuration to use this version.


回答6:

I Faced an issue where localhost was not running(i.e. the website did not load).

I had installed IIS 10.0 express after I had installed Visual Studio along with .NET framework.

Due to this later installation of IIS , localhost did not load.

I ran aspnet_regiis -i under the path

C:\Windows\Microsoft.NET\Framework64\v4.0.30319

This sucessfully solved the issue.