About Me
I am a software engineer, currently working in Bali. During my (almost non-existent) spare time, I like hacking Linux, coding for fun, playing computer games, jamming with my saxophone, and last but not least, spending time with my girlfriend.

Posts Tagged ‘ASP.NET’

The Weird MetaBase Problem with ASP.NET and IIS

An oddball I’ve run into twice during my relatively short IT career is this:

After painstakingly trying to get a web service up and running, and using IIS as the server, I get this error:

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.

Microsoft has a Knowledge Base article here: http://support.microsoft.com/kb/267904 but I found that it is somewhat misleading. Why did I think so? Because any web service need to use IUSR_MachineName. If the said anonymous user account does not have permission, it wouldn’t display the MetaBase error message at all.

The real cause is, more often than not, IIS that was installed after the need for it arose when using Visual Studio. (Note to self: for future XP installations, IIS should be installed up front, if the machine will be used for Windows development!) Apparently this affects both IIS 5.0 (Windows XP) and IIS 6.0 (Windows Server 2003).

So this is what I will do:

  1. Open Start Menu – Programs – Microsoft Visual Studio 2005 – Visual Studio Tools – Visual Studio 2005 Command Prompt (the regular command prompt doesn’t work, because the paths aren’t set to run Visual Studio executables)
  2. Type aspnet_regiis -i. This will do three things:
    1. Install the current version of ASP.NET on IIS
    2. Update MetaBase scriptmaps
    3. Upgrade old scriptmaps if they exist
  3. That’s it! If it still doesn’t work then…… *rolls eyes*

Technorati : , , ,
Del.icio.us : , , ,
Zooomr : , , ,
Flickr : , , ,

Copy Protected by Chetan's WP-CopyProtect.