I am getting the "Failed to access IIS metabase." error message trying to hit an ASP.NET 2.0 application on my development box.
I installed things in the natural order. I can't recall if I installed IIS (5.1) before or after .NET 1.1 and Visual Studion 2003 (installed 3 years ago), but this same box had (and still has) ASP.NET 1.1 applications that run just fine.
Recently, I installed Visual Studio 2005. When I hit an ASP.NET 2.0 application I get the "Failed to access IIS metabase." error message.
If I set the userName to SYSTEM in the processModel of the machine.config file, the appliaction works just fine. Omitting the userName attribute gives me the error. From reading other posts, this is indicative of a permissions problem. So, without specifying
the userName, I tried the application while running filemon, but I don't see any file access getting denied like I expected to see based on the posts I have read.
I have run:
aspnet_regiis -i
and
aspnet_regiis -ga ASPNET
and neither of them resolves the problem. I have also tried reinstalling .NET 2.0 and that didn't fix anything either.
Zhao Ji Ma
Sincerely,
Microsoft Online Community Support
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
I have already tried everything in all these links. I have done a full uninstall and reinstall of .NET 2.0, as well as a repair install. Neither resolved my problem.
Here is my stack trace (which is the same as mentioned in one of those links):
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.
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
Zhao Ji Ma
Sincerely,
Microsoft Online Community Support
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
> 1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
Yes, as I said, ASP.NET 1.1 applications are running just fine. And I did a net start and the IIS Admin service is present in the list.
> 2) Is ASP.NET installed - Run aspnet_iisreg.exe /lv from the VS command line prompt.
Yes, as I said, ASP.NET 1.1 applications are running just fine. However, I don't understand what the Visual Studio command prompt has to do with this. There is no file named aspnet_iisreg.exe in that directory. In fact, there are no .exe files in that
directory so why a VS command prompt as opposed to a command prompt. Secondly, I am not aware of an executable named aspnet_iisreg.exe, do you mean aspnet_regiis.exe? I assume so. If so, as I said in my original post, I have run aspnet_regiis.exe -i and
aspnet_regiis.exe -ga ASPNET and neither have resolved the issue.
> 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
I don't know what this means, but again, as far as I can tell, aspnet_iisreg.exe doesn't exist. I have run aspnet_regiis.exe with no results. Why /e? Why would I want to remove the client side scripts?
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:
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!
Try to navigate to the path in the command prompt where framework has been installed. (For ex: C:\Windows\Microsoft.NET\Framework\v2.0.50215.44)and
run the commandsaspnet_regiis.exe -u and thenaspnet_regiis.exe -i
Hope this helps.Regards,Raja
Narendra Reddy
joerattz
Member
685 Points
163 Posts
"Failed to access IIS metabase." with ASP.NET 2.0
Jan 18, 2007 06:57 PM|LINK
I am getting the "Failed to access IIS metabase." error message trying to hit an ASP.NET 2.0 application on my development box.
I installed things in the natural order. I can't recall if I installed IIS (5.1) before or after .NET 1.1 and Visual Studion 2003 (installed 3 years ago), but this same box had (and still has) ASP.NET 1.1 applications that run just fine.
Recently, I installed Visual Studio 2005. When I hit an ASP.NET 2.0 application I get the "Failed to access IIS metabase." error message.
If I set the userName to SYSTEM in the processModel of the machine.config file, the appliaction works just fine. Omitting the userName attribute gives me the error. From reading other posts, this is indicative of a permissions problem. So, without specifying the userName, I tried the application while running filemon, but I don't see any file access getting denied like I expected to see based on the posts I have read.
I have run:
aspnet_regiis -i
and
aspnet_regiis -ga ASPNET
and neither of them resolves the problem. I have also tried reinstalling .NET 2.0 and that didn't fix anything either.
What do I do next?
Thanks.
http://www.linqdev.com
http://www.netsplore.com
vivek_iit
All-Star
17778 Points
3189 Posts
MVP
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 19, 2007 10:43 AM|LINK
These posts might help:
http://support.microsoft.com/kb/555583
http://blog.devstone.com/Aaron/archive/2006/05/08/1586.aspx (go through the comments here)
Vivek
Communifire: Social Networking and Business Collaboration Platform
Zhao Ji Ma -...
All-Star
23104 Points
2380 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 19, 2007 12:02 PM|LINK
Hi,
Can you provide more detailed information, e.g. stack trace?
Here is another similar problem: http://forums.asp.net/thread/1526382.aspx
Hope it helps!
Sincerely,
Microsoft Online Community Support
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
joerattz
Member
685 Points
163 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 19, 2007 09:57 PM|LINK
I have already tried everything in all these links. I have done a full uninstall and reinstall of .NET 2.0, as well as a repair install. Neither resolved my problem.
Here is my stack trace (which is the same as mentioned in one of those links):
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:
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
http://www.linqdev.com
http://www.netsplore.com
hosseinlotfi...
Member
42 Points
11 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 21, 2007 11:58 AM|LINK
Hi
I have the exact same problem did you solve yours? and if yes how?
regards
Hossein
Zhao Ji Ma -...
All-Star
23104 Points
2380 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 22, 2007 07:07 AM|LINK
Try this: (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=116989&SiteID=1)
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
Sincerely,
Microsoft Online Community Support
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
joerattz
Member
685 Points
163 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 22, 2007 02:37 PM|LINK
> 1) Is IIS installed on the machine (From a command prompt NET START - Is IIS Admin service present in the list)
Yes, as I said, ASP.NET 1.1 applications are running just fine. And I did a net start and the IIS Admin service is present in the list.
> 2) Is ASP.NET installed - Run aspnet_iisreg.exe /lv from the VS command line prompt.
Yes, as I said, ASP.NET 1.1 applications are running just fine. However, I don't understand what the Visual Studio command prompt has to do with this. There is no file named aspnet_iisreg.exe in that directory. In fact, there are no .exe files in that directory so why a VS command prompt as opposed to a command prompt. Secondly, I am not aware of an executable named aspnet_iisreg.exe, do you mean aspnet_regiis.exe? I assume so. If so, as I said in my original post, I have run aspnet_regiis.exe -i and aspnet_regiis.exe -ga ASPNET and neither have resolved the issue.
> 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
I don't know what this means, but again, as far as I can tell, aspnet_iisreg.exe doesn't exist. I have run aspnet_regiis.exe with no results. Why /e? Why would I want to remove the client side scripts?
Thanks.
http://www.linqdev.com
http://www.netsplore.com
joerattz
Member
685 Points
163 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jan 29, 2007 06:03 PM|LINK
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!
http://www.linqdev.com
http://www.netsplore.com
getraja21
Member
2 Points
1 Post
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jun 04, 2008 04:03 PM|LINK
Hi,
Try to navigate to the path in the command prompt where framework has been installed. (For ex: C:\Windows\Microsoft.NET\Framework\v2.0.50215.44)and run the commandsaspnet_regiis.exe -u and thenaspnet_regiis.exe -i Hope this helps. Regards,Raja Narendra Reddysetahamid
Participant
1299 Points
245 Posts
Re: "Failed to access IIS metabase." with ASP.NET 2.0
Jun 16, 2008 06:42 AM|LINK
Hi
Visit The Folowing Url ..
http://errorsolution-hamid.blogspot.com/
U will get the Solution .
Regards
Seta hamid .Hamid Seta
http://www.hamidseta.blogspot.com/
Remember to click “Mark as Answer” on the post, if it helps you.