locked
Failed to access IIS metabase, VS2005 RC

    Question

  • I am developing a webservice in Visual Studio RC. I have just got a new pc and my problem is that I am not able to access this webservice. I have created a virtual directory in IIS, but if I try to browse there, I get a "Failed to acces IIS metabase" error message. Does anybody know how I can resolve this problem?

    Tuesday, October 25, 2005 10:04 AM

Answers

  • 1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
    2) Is ASP.NET installed  - Run aspnet_iisreg.exe /lv from the VS command line prompt
    3) For 2) is the default install for ASP.NET v2.0 as opposed to v1.1 ( the running version is marked with the (root)value). If not then then run aspnet_iisreg.exe /i /e

    If none of the above can you provide more info?

    Thanks. Mark Fussell
    WSE Program Manager
    Wednesday, October 26, 2005 9:50 PM

All replies

  • 1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
    2) Is ASP.NET installed  - Run aspnet_iisreg.exe /lv from the VS command line prompt
    3) For 2) is the default install for ASP.NET v2.0 as opposed to v1.1 ( the running version is marked with the (root)value). If not then then run aspnet_iisreg.exe /i /e

    If none of the above can you provide more info?

    Thanks. Mark Fussell
    WSE Program Manager
    Wednesday, October 26, 2005 9:50 PM
  • I am sorry for the late response Mark, but I have been busy the last few days and have put this problem aside for a while. I did try your suggestions, but they did not help. I suspect the cause of the problem is that VS 2005 RC was installed before IIS. Now, I am awaiting the official release very soon, so I have decided to not care about this before that and install everything from scratch when I am getting the official release.

    Wednesday, November 02, 2005 10:10 PM
  • Mark,
    I am creating a test web site in my local W2K SP4 IIS with "the Microsoft Visual Studio 2005 Version 8.0.50727.7  (RTM.050727-0700) Microsoft .NET Framework Version 2.0.50727 Microsoft Visual Web Developer 2005 Express  76872-000-0000011-00123. I have the similar error message, "Failed to access IIS metabase"
     
    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).
    Stack Trace:

    [HostingEnvironmentException: Failed to access IIS metabase.] System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +671 System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9 System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +174 System.Web.CachedPathData.GetConfigPathData(String configPath) +395 System.Web.CachedPathData.GetConfigPathData(String configPath) +260 System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +166 System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +187 

    I visited the doc. http://support.microsoft.com/?kbid=267904. that was suggested by the error message. However, when I ran "aspnet_regiis –ga <WindowsUserAccount>" from Command Prompt, aspnet_regiis is not recognized.
    I downloaded and ran the metaacl.exe to add my account to the list and then restart the IIS, but I still have the problem.
    I also based on another web site to change the Machine.config
    <system.web>   <processModel autoConfig="true"/>  to
    <system.web>   <processModel userName="SYSTEM"/> 
    and restart IIS. I still have the same error message.

    Can you help?

    Bong
    Friday, November 04, 2005 4:29 PM
  • Make sure that Windows Authentication is enabled for the Virtual Directory in IIS.  You will get this error if it is unchecked.  To see if it's enabled, click on the Directory Security tab, click Edit under Access control, and place a check in the Intergrated Windows Security box.  You MUST restart IIS for the changes to take effect!
    Saturday, November 05, 2005 8:28 AM
  • gameprix1,
    Thanks for the response. I checked Authentication Method Window for my IIS. The Intergated Windows Security box is checked. I think it is enabled as default. I also checked the Authentication mode in the ASP.NET Configuration Settings Window under the ASP.NET Tag in site properties. It is Window. It seems asp files work but not aspx files.
    Bong

    Monday, November 07, 2005 3:14 PM
    1. If that is the case, you can check a couple of these options.  It should all be there, but you never know!
    2. Right-click on the virtual directory (or Default Web Site), go to properties and click on the Configuration button.  Under the Mappings Tab, make sure .aspx and other .NET related extentions are listed.  If not, I believe you'll have to run the aspnet_regiis.exe utility.
    3. This shouldn't affect your problem, but it might.  Under the Documents Tab, it seems you have to manually add  index.aspx or default.aspx.  Again, this probably isn't causing your problem UNLESS you are not supplying the page name in the address bar when navigating.
    4. If you're using Windows 2003, make sure you've enabled ASP.NET in IIS Manager.
    5. Lastly, make sure the ASPNET account has proper rights for the directory and it's subs. 
    Wednesday, November 09, 2005 8:55 PM
  • Hi,
    in my case this error was caused by the fact that i had installed IIS AFTER .NET2.0 . Therefore the rights of the ASPNET user had not been set correctly.
    I fixed this by uninstalling (not repairing) the .NET Framework completely and then reinstalling it (no reboot necessary on WinXP). After that i had to set :NET 2.0 again as the Standard .NET Version in IIS and my error-message was gone.
    Hope this helps.

    greetings
    fenrir
    Friday, November 11, 2005 12:17 PM
  • I had the same problem : I installed VS (and .NET framework) before installing IIS and just reparing the .NET framework from the add/remove program worked without having to unistall and reinstall. Try repairing firt .. it may save you some time.
    Sunday, November 20, 2005 7:37 PM
  • i face the same problem , but i have installed the .net framework after the iis ,
    and by the way , the time tracker sample is working very good and without any problem !?
    Tuesday, November 29, 2005 7:34 AM
  • So annoying...

    I was trying to fix this on a Windows 2000,

    I think the Microsoft article did not dot help...
    C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga ASPNET
    and a restart (looks like the utility did not take the command...)


    Eventually:
    IIS -> Web Site -> Operators -> Add -> ASPNET -> BINGO

    Friday, December 02, 2005 12:22 AM
  •  Mark Fussell wrote:
    1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
    2) Is ASP.NET installed  - Run aspnet_iisreg.exe /lv from the VS command line prompt
    3) For 2) is the default install for ASP.NET v2.0 as opposed to v1.1 ( the running version is marked with the (root)value). If not then then run aspnet_iisreg.exe /i /e

    If none of the above can you provide more info?

    Thanks. Mark Fussell
    WSE Program Manager


    Not to be nit-picky.. but this doesn't work..

    C:\WINNT\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis /i /e
    Some options specified are not compatible. Use aspnet_regiis /? to see all options.
    Tuesday, December 06, 2005 8:20 PM
  •  Yovav wrote:

    So annoying...

    I was trying to fix this on a Windows 2000,

    I think the Microsoft article did not dot help...
    C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga ASPNET
    and a restart (looks like the utility did not take the command...)


    Eventually:
    IIS -> Web Site -> Operators -> Add -> ASPNET -> BINGO



    Alright.. this works...

    Now tell me why.. because this feels like a nasty hacky kludge to me and a maintenance nightmare.

    The server is running Windows 2000 Server, has several deployed and working ASP 1.1 applications on it.

    The server also has several other web sites on it, some running ColdFusion MX.  ASP.Net 2.0 was installed on the machine. 

    I ran : aspnet_regiis -iru
    Then : aspnet_regiis -s W3SVC/1/Root/<appPath>

    The 1.1 applications continued to work fine.  The 2.0 application failed with the metabase error until ASPNet was made an operator for the site.  Afterwords, both the 1.1 applications and the 2.0 applications work fine.

    Why?
    Tuesday, December 06, 2005 9:04 PM
  • FWIW, I tried absolutely everything in this thread and a whole lot more. Nothing worked until I reinstalled the .NET Framework 2.0:
    Add/Remove Programs->Microsoft .NET Framework 2.0->Change/Remove->Reinstall.

    Despite the warning that I would need to reboot, it worked without doing so.

    YMMV

    -Wackyspat
    Wednesday, December 07, 2005 9:48 PM
  • Where exactly is the "Operators" set up in IIS?  I see no dialog to do so in IIS.
    Thursday, December 15, 2005 4:52 PM
  • Yovav,

    Thanks!  I was going down the exact same path of frustration and your suggestion was the magic bullet.

    I appreciate it.

    Mike

    Hey: Microsoft: Update that KB article to mention adding ASPNET to Site Operators tab!!!

     

     

     

    Monday, December 19, 2005 9:06 PM
  • That would be located on the windows Server environments
    Monday, December 19, 2005 9:11 PM
  • Adding ASPNET account as an operator fixed this problem for me, after I upgraded to NET 2.0.
    Saturday, December 24, 2005 2:36 PM
  • I ran into this problem as well, and the KB article was completely useless -- sorry, MS.  In my case, I installed .NET 2.0 onto a long-standing Windows2000 server. 

    Anyway, I found "Operators" like this:

      IIS -> [Website] -> Properties

    There's an Operators tab.  Adding the ASPNet identity got past the inability to access the IIS metabase.
    Saturday, December 24, 2005 6:13 PM
  • So if this is only available in the server environments, then how does one solve this problem when on Windows XP professional using IIS 5.1?  There's no "operators" tab to access...   :-(
    Thursday, December 29, 2005 2:47 PM
  • Ah ha ha ha ha!!! OK On windows XP SP2 I was able to resolve the same problem by running the command line aspnet_regiis.exe -i  from the Visual Studio 2005 Comand prompt. Now my aspx pages run...

    Warning: I think this command sets all of your web folders to use ASP 2.0 and "upgrades" them from ASP 1.0 or 1.1, so your old ASP.NET code might have a problem...

    Hope this helps someone else down the line...
    Thursday, December 29, 2005 3:25 PM
  • Does anyone have more suggestions how to fix this problem for WinXP SP2?

    In my case, I installed VSS2005 and I have this failure trying to access the VSS web service. Here are the things I've tried without any success:
    - uninstall and reinstall VSS20005 and .NET 2.0
    - aspnet_regiis -ga ASPNET (as instructed in the support page)
    - download MetaACL.vbs from the support page and grant all permissions to ASPNET account.
    - aspnet_regiis -i
    - aspnet_regiis -i -enable
    - aspnet_regiis -ir
    - aspnet_regiis -u and reinstall/enable aspnet again
    - stop and restart World Wide Web Publishing service
    - reboot computer

    The result is now as follows:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -lk
             W3SVC/  2.0.50727.0
             W3SVC/1/ROOT/Printers/  2.0.50727.0
             W3SVC/1/ROOT/SourceSafe/        2.0.50727.0

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -lv
    1.1.4322.0      Valid           c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
    2.0.50727.0     Valid (Root)    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

    C:\WINDOWS\system32\inetsrv>cscript Metaacl.vbs "IIS://Localhost/W3SVC"
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    ALINC-HOME-XP\IUSR_ALINC-HOME-XP
        Access: R   E
    ALINC-HOME-XP\Alinc
        Access: R   E
    BUILTIN\Administrators
        Access: RWSUED
    Everyone
        Access:     E
    ALINC-HOME-XP\VS Developers
        Access: RWSUE
    ALINC-HOME-XP\ASPNET
        Access: RWSUED


    yet when I access the VSS web service I still receive the following error:

    --------------------------------------------------------------------------------
    Server Error in '/SourceSafe' Application.
    Failed to access IIS metabase.

    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). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

    Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace: [HostingEnvironmentException: Failed to access IIS metabase.]
       System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3492170
       System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
       System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163
       System.Web.CachedPathData.GetConfigPathData(String configPath) +382
       System.Web.CachedPathData.GetConfigPathData(String configPath) +243
       System.Web.CachedPathData.GetApplicationPathData() +68
       System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3385679
       System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189
    --------------------------------------------------------------------------------

    Does anyone know how to fix this problem for Win XP SP2?
    I see that I'm not the only one with problems in this config...

    Thanks,
    Alin

    Thursday, January 12, 2006 8:21 AM
    Moderator
  • I'm running XP sp2 and can't resolve this problem after trying everything in this thread and more.  Has anyone determined more precisely what the issue is?   I've been at this about 7-8 hours now and am starting to feel a loss of mojo..

    For one thing, where is the metabase for iis 5.1?  I've located metabase.bin, but is the xml version only in 6.0? 

    Thanks.

    Saturday, January 14, 2006 11:53 AM
  • Fenrir - Thank you soooo very very much!! That's precisely what the problems was - I was really freaking for a moment!
     
    Now I can continue with my stooding :)
     
    Sunday, January 15, 2006 7:10 PM
  • After try to run aspnet_regiis thing or use the tool from MS and the errors are still there, i uninstalled all Visual Web Developer, all .Net Framework, IIS and then reinstall them : IIS first, then Visual Web --> THE ERRORS ARE GONE.
    I run on WinXP Pro SP2
    Hope this will help.
    Thks.
    Tuesday, January 17, 2006 2:31 AM
  • I was basically running every combination of switch that aspnet_regiis had trying to make things work. But it was the adding of ASPNET to the Operators of the site that made things finally work. I believe that aspnet_regiis wasn't neccessaraly setting all of the security settings correctly. For ex. ASPNET was the operator for every single site that I had ASP.NET 1.1 on, but not the 2.0 site that I was trying to get working. The ASPNET user needs access to the IIS metabase in order for things to work (i.e. the -ga switch), and from that point of view, security wise things would work. But what happens is that even though the ASPNET user can access the IIS metabase, the ASPNET user can't access the physical website, which would then allow it to access the IIS metabase. Hence, why ASPNET is needed to be added to the Operators portion of the website.

    To clarify for other people what to do, go to IIS branch in the Computer Management, R-click on your website, and select Properties, then go to the Operators tab, click Add... select the ASPNET user, Ok, Ok, and things should work.

    Tuesday, January 17, 2006 9:39 PM
  • Hi bhbao,

    I had nothing of interest on my IIS server, so I tried your solution. Uninstalling .NET Framework, IIS, VSS, then reinstalling them (IIS first) fixed the problem for me, too, on XP SP2.

    However, I think someone from MSFT/ASPNET group should take a second look at this error, because the solution proposed in the MSDN article doesn't seem to work for XPSP2.

    Alin

    Monday, January 30, 2006 12:08 AM
    Moderator
  • I fixed it with the next .bat:

    Guess it's a bug you can fix removing the aspnet user and re-creating with the asp.net tool.

    NOTE: Find first where is the path to the aspnet_regiis.exe because if you run the wrong version troubles will continue.

    Hope it helps.

    @echo off
    echo ----------------------
    echo ASP.NET & IIS Re-Bind
    echo ----------------------
    echo Stopping IIS

    iisreset /stop
    echo ----------------------

    echo Deleting the ASPNET account
    net user ASPNET /delete
    echo ----------------------

    echo Stopping ASP.NET State Service
    net stop aspnet_state
    echo ----------------------

    echo Reregistering ASP.NET and the ASPNET account.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
    echo ----------------------

    echo Starting ASP.NET State Service
    net start aspnet_state
    echo ----------------------

    echo Atempting to restart IIS
    iisreset /start
    echo ----------------------

    echo Binding Complete...
    pause

    @echo on

     

     

     

     

     

     

    Thursday, February 02, 2006 3:08 PM
  • I was also getting the same error message. I had also installed ASP.net before IIS.

    I could solve this problem by running aspnet_regiis.exe -i  from the VS 2005 commamd prompt.

    I think you can get ober it.

    Monday, March 27, 2006 9:20 AM
  • OS: Winxp sp2

    VS: VSTS2005

    .Net Framework: v2.0.50727

    Troubleshooting:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe /lv
    1.1.4322.0      Valid           C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\asp
    net_isapi.dll
    2.0.50727.0     Valid           C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\as
    pnet_isapi.dll

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe /i /e
    <invalid Options, Show Help>

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i -e
    <invalid Options, Show Help>

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i
    Start installing ASP.NET (2.0.50727).
    ...................................
    Finished installing ASP.NET (2.0.50727).

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i -e
    1.1.4322.0      Valid           C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\asp
    net_isapi.dll
    2.0.50727.0     Valid (Root)    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

    Can u c the Valid (Root)?
    Now http put/get requests are successful in forwarding to my own HttpHandlerFactory.

    And I found a small bug which confuses me:
    In Application Configuration Dialogure, -> Mappings Tabsheet:
    1 click Add
    2 click "Browse..." to locate the dll:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
    3 Input any Extension text, Clear "Check that file exists"

    Now, OK button is disable..... -_-b
    Because Executable Editor's Text shows short text for the full file path.
    The short text is not a valid path.
    When the Executable Editor get the focus once again, the OK button is enable.

    Thursday, April 13, 2006 6:20 AM
  • I had the same problem , XP SP2, IIS installed after VS2005,

    this is how it got resolved  without any reinstalltions of IIS or VS2005 and rebooting the computer.

    1. Ensure Integrated Windows Authentication is enabled for the Virtual Directory in IIS.
    2.  > aspnet_regiis -ga [AccountName]
    3.  > aspnet_regiis -i
    4.  Restart IIS

    Thanks.

    Friday, April 28, 2006 11:31 PM
  •  

    I have installed dotnetfx.exe 2.0 on Win 2000 server IIS 5.0, and the ASPNET user was not added to user list. Will running aspnet_regiis.exe -i resolve my problem?

    Thursday, May 18, 2006 3:11 AM
  • When ASP.NET 2.0 is registered in IIS it adds MACHINE\ASPNET to the **top-most level** (machine name level) of the metabase permissions. The permission that is granted is ONLY "Enumerate Sub Keys". In other words, it adds an entry to the "/AdminACL" property that enables it to essentially only look at the key names (not property names or values). The way metabase inheritance works is if you try to read something like /w3svc/1/root/somesubFolder using code, IIS will check for an AdminACL property first off of "somesubFolder". If it can't find it there it checks "root", then "1", then "w3svc" then finally "/", THen based on the permissions set in this AdminACL property, you'll be granted or denied what you're requesting. On a default configuration of IIS there will be no AdminACL properties between "somesubFolder" and "/" so we can see the ASPNET account all the way at the root, for requests originating from "somesubFolder".

    The Problem: If at any point you've added then perhaps removed an account or group from the Operators tab of a web site, it creates an AdminACL property for that web site. In other words, you'll now have a /w3svc/1/AdminACL property that includes the account you just added. This doesn't touch that top-level permission set. Now you install ASP.NET 2.0 which adds ASPNET to "/". When you go to execute some sort of code that wants to read settings from your site's properties, it finds the AdminACL property that was created when you added an Operator, and it stop there. ASPNET is not there of course since it picked up the settings from the root level only when you added the new Operator. So you can't read from the metabase at that level!!

    Do you want to add ASPNET to the "Operators" tab? NOOOOO!!!!! Doing that would give ASPNET Read/Write permissions to the metabase for that web site. I'd have to consider it a bug that the IIS MMC considers ASPNET an Operator if it only has "Enumerate Sub Keys". An operator actually has "Enumerate Sub Keys", "Read", and "Write". Why is it bad if ASPNET has Read/Write permissions? I don't want to go into detail, but let's just say you can hack the entire machine and run any ASP code you want as SYSTEM if you do that.

    What is the proper fix? Get rid of that non-default AdminACL property set on the web site so we can inherit from the root level of the metabase for permissions. That might remove your custom operator, but honestly that shouldn't be there anyway since that user could make themselves an Admin like I hinted at above.

    1. Open a CMD prompt.
    2. Change to the c:\inetpub\AdminScripts folder.
    3. Type "cscript adsutil.vbs delete w3svc/1/AdminACL".

    Note: If your "web site identifier" is not "1" then change that to the appropriate number when running this command.

    Thursday, June 15, 2006 4:40 PM
  •  Superboy wrote:
    I had the same problem : I installed VS (and .NET framework) before installing IIS and just reparing the .NET framework from the add/remove program worked without having to unistall and reinstall. Try repairing firt .. it may save you some time.

    This worked just fine for me - thanks :)

    Monday, July 03, 2006 2:42 PM
  •  Jason Monroe wrote:

    I ran : aspnet_regiis -iru

     

    That one just worked for me on Windows XP Professional

    Viva la forums :-)

    Thursday, September 14, 2006 5:34 AM
  • My website is running on Windows XP Pro and I can't find an "Operators" item anywhere in Internet Services Manager for this version of IIS (5.1)

    Where is "Operators"?  Or doesn't it display now?

    (I've already tried all of the other suggestions and none of them have worked; aspnet_regiis, repair, re-install, ...)

    Saturday, November 18, 2006 11:58 AM
  • This did not solve my problem.  I tried "cscript adsutil.vbs delete w3svc/1/AdminACL" but I am still getting the same error.  I have also tried the -ga as well as the "-u then -i" aspnet_regiis suggestions.

    Where, specifically, does one go to grant ASPNET access to the metabase??

     

    Thursday, November 30, 2006 4:27 PM
  • I haven't reviewed all of your posts specifically, but I solved it for myself using a method not shown explicitly on any site I could find.

    There are some mentions of "installing IIS" in the wrong order, but as I never installed IIS as a separate step I ignored them at first.  This turned out to relate to my problem.

    In the end, I de-installed IIS (from Windows Components) from my machine, and (I think) re-installed IIS and then VS2005.  My apologies if I get the order wrong, I'm already troubleshooting other fall-out from my upgrade to WinXP.

    In my case, I originally went in this order: 1) Win2000Pro (long time ago), 2) VS2005, 3) upgrade to WinXP Pro.  This brought in an IIS 5.1 upgrade after VS2005 (and not forgetting .NET framework 2.0), which was apparently what caused my problem.

    After all this mucking around (I'm guessing 10 hours) I needed to use the IIS manager to variously enable asp or asp.net 1.1 or asp.net 2.0 on my root level and sub-folders (sub-sites), but that was pretty straight-forward.  I had to press "Create Applciation", too.

    My take on granting permissions to the metabase is that because the "Operators" feature isn't supported on WinXP Pro, you can't do it "the normal way" you would on a server, and if you install everything in the right order, then somehow a default setting gets made, etc.

    Good luck.

    Thursday, November 30, 2006 5:30 PM
  • The error mentioned is a metabase permissions issue. To get an accurate picture on what the metabase permissions are, install Metabase Explorer from the IIS 6.0 Resource Kit Tools. For every node that has permissions set explicitly on it, there will be an AdminACL property. Make sure there are no AdminACL properties other than at the top-most level, on the "AppPools" node (if IIS 6.0 and not XP), and on any "Filters" nodes. If you see AdminACL anywhere else, just delete it. Then for the top-most level, make sure ASPNET is part of that permission set.

    Note: Before changing settings like this, it probably would be a good idea to backup the metabase.

    Thanks,

      Brian Murphy-Booth

    Friday, December 01, 2006 1:48 PM
  • I had this problem, and none of the proposed solutions so far worked for me.

    Ok, I have a solution that worked for me courtesy of Microsoft support.

    The problem had to do with the ASPNET user, and its permissions, and apparently some bug in the ASP.NET install.  I had tried all the things in these threads:

        http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=116989&SiteID=1
        http://blog.devstone.com/Aaron/archive/2006/05/08/1586.aspx

    But none of them worked for me.  Here is what worked for my box:

    We followed below steps to resolve the issue -

    1. Unregistered all the versions of ASP.NET with command "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ua".

    2. Deleted the ASPNET account from "Local Users and Group – Users".

    3. Then registered ASP.NET 2.0 with IIS using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i".

    4. Gave permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET".

    5. Reset the IIS and that resolved the issue for ASP.NET 2.0.

    6. We registered ASP.NET 1.1 with IIS as well using command "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis –i".

    7. Reset the IIS.


    After following the above steps we configured virtual directory versions as required and test both ASP.NET 1.1 and ASP.NET 2.0 application.

    Everything worked fine as expected.


    CAUSE:

    ====================

    This problem occurs because the process model user account (in our case, ASPNET) does not have the correct user rights for the required system files and folders to run the ASP.NET worker process.

    It's a little unclear to me exactly which part of this really resolved the problem because I had already done lots of these steps already without the problem being solved..  The problem was not resolved until we granted access to machine\ASPNET:

        aspnet_regiis –ga [machinename]\ASPNET

    But, I believe I had already tried that before and it didn't fix the problem, but I couldn't swear that I did.

    I mention the machine name specifically because I had tried to grant access to ASPNET (no machine name) and while this didn't generate an error message, it also didn't work.  And that's odd because if I try to grant access to a made up account name, it does give an error message.  So somehow, granting access to ASPNET doesn't generate an error that it is a non-existant account, but it fails to grant access to the machinename\ASPNET account.  Odd.  Even odder is the number of people in those two referenced threads that granting access to ASPNET without specifying the machine name worked for.  It apparently works some times without the machine name, but it didn't for me.

    I bring this up because it may have been necessary that we deleted the ASPNET user and allowed the ASP.NET install to re-create it.  If I were trying to resolve this problem now, I would try to grant access and specify the machine name before I uninstalled everything just to see if that fixes the problem.

    There apparently is a problem where if the ASPNET user already exists when ASP.NET 2.0 is installed, under some (unknown) circumstances, the ASPNET user doesn't get its permissions updated properly.  Obvioulsy this doesn't happen the majority of the time.  There are 3 other .NET developers here all running similar systems (same hardware, same versions of software, and it didn't happen to them.  Just my luck!

    Monday, January 29, 2007 7:11 PM
  • Thank you, thank you, thank you, Joe.

    Your steps worked quickly and well.  Can't tell you if any step is unnecessary, I followed each one. 

     

    One more time,

    thanks,

    Larry

    Monday, April 30, 2007 4:52 AM
  • Thanks Jason,

     

    I tried many things before I saw your soln.. It worked.

     

    Thanks.

    Kumar

     

     

     

    Thursday, May 03, 2007 6:44 AM
  •  

    This article contains some basic information about how to easily fix this simple problem:

     

    http://www.chapterzero.co.uk/articles.aspx?article=Failed-to-access-IIS-Metabase&id=22

     

    Monday, August 20, 2007 2:12 PM
  • Thanks for the information - one thing I had to do was to assure the ASPNET user (after all the above steps) has proper privileges.  It originally had restricted level access and that didnt work.  I gave it administrator privileges (I am on my local PC) and it worked.  It has to do with the ASPNET accessing the temporary directory in the 2.0 directory (C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files).

     

    Thanks again.

    Tuesday, January 29, 2008 4:52 PM
  • limajim,

     

    You made ASPNET an administrator? Well... you're all prepared for a worm to take over your machine then if an exploit is discovered for ASP.NET 2.0. Cool!!

     

    It would probably be better to give permissions to ASPNET to the various ASP.NET folders instead of elevating the user to a point that dangerous things can happen.THen of course remove ASPNET from the admin group.

    Wednesday, February 06, 2008 1:25 PM
  • Mark Fussell said:

    1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
    2) Is ASP.NET installed  - Run aspnet_iisreg.exe /lv from the VS command line prompt
    3) For 2) is the default install for ASP.NET v2.0 as opposed to v1.1 ( the running version is marked with the (root)value). If not then then run aspnet_iisreg.exe /i /e

    If none of the above can you provide more info?

    Thanks. Mark Fussell
    WSE Program Manager


    hi sir mark,

    can i ask a question regarding the website i created...its asp.net site and contain only 1 page. it actually filter data from the database and have a button for exporting the filtered data into an excel file. after publishing to a server and tried to test it, i got this error (Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the following error: 80070005).

    thank you.

    cleyventh
    Monday, July 28, 2008 9:54 AM
  • when i tried the step 2 i g0t this message. aspnet_iisreg.exe /lv is not recognized as an internal or external command, operable program or batch file. what should i do? thanks
    Tuesday, July 29, 2008 3:22 AM
  • Thanks Joe It worked for me.

    -Pardha
    Saturday, November 01, 2008 11:31 AM
  • I had installed IIS 5.0 after installing .NET Framework 2.0

    So just repairing the .NET Framework from add/remove programs worked for me

    Thanks to Superboy for the suggestion
    Monday, November 09, 2009 3:26 PM