2008-04-13

Failed to access IIS metabase error while trying to access ASP page on localhost

When trying to open a website on my localhost I received the following error message:

"Failed to access IIS metabase.
Description: [...]
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). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904."

After some digging I discovered that the cause of the problem is that I installed Visual Studio 2008 before installing IIS.
The problem can be fixed by running aspnet_regiis.exe /i (I think it's called aspnet_iisreg.exe in older versions of VS) from the Visual Studio 2008 Command Prompt or from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727> folder.

1 comment:

Anonymous said...

Thank you. This was driving me nuts.