Failed to access IIS Metabase error.

Hey all,

Today I was working on VS2008 and with the help of “view in browser” option i was trying to view the website but i came across the error “Failed to access IIS Metabase”. I was seeing this error for the first time.So i tried to figure out what the problem was and after a long research i was successfull in finding out the solution for this which i would like to share with you all.

Below i mentioned the problem and solution in detail so go through it.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC).

Microsoft .Net framework installation registers the framework on the IIS. Beside performing many other configrations in the OS and IIS, it also creates ACLs (Access Control List). .NET framework installation registers the framework in the IIS using ASP.NET IIS Registration Tool (aspnet_regiis.exe). The ASP.NET IIS registration tool allows installation program (or administrator) to update script maps for ASP.NET applications to point to the ASP.NET ISAPI version that is associated with the tool.

Run the following in the Command Prompt (cmd.exe)
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
-i switch is used for installing ASP.NET and upgrading all application pools to ASP.NET version which came with the ASP.NET IIS Registration Tool. It will ignore the previous version of application pool. Please note that the above command will only affect the applications that are currently mapped to an earlier version of ASP.NET.

The following command will install the script maps pointing to the ASP.NET version that is associated with the ASP.NET IIS Registration Tool to the application “App1”.
aspnet_regiis -s W3SVC/1/ROOT/App1

Hope this helps… 🙂

Happy Coding.

Leave a Comment

« Newer Posts