Hoje me deparei com mais um erro “estranho”. Estranho porque nunca tinha passado por isso. Ao tentar executar uma nova instalação DotNetNuke recebi o seguinte erro:
System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
Falha ao acessar metabase IIS: System.Web.Hosting.HostingEnvironmentException
Segundo o support.microsoft.com (, cujo link direto para o artigo se encontra nas referências,) o erro parece acontecer ao tentar executar uma aplicação ASP.NET 2.0. O motivo, segundo eles, é que o IIS (Internet Information Services) foi instalado após a instalação do Microsoft.NET Framework 2.0. No mesmo artigo encontra-se uma solução, que no meu caso, e pelo que li pela internet, não soluciona o problema da maioria. Após procurar por vários posts, encontrei um que solucionou meu problema.
Colocarei aqui o post dele na íntegra. Foi postado por joerattz em 29/01/2007 às 19:03. O link direto para o post se encontra nas referências.
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.
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!
No meu caso, realizei apenas o passo 3 no meu prompt de comando, o famoso CMD, executando a seguinte instrução:
Não se esqueça de deixar seu comentário, critica, elogio, dúvida e etc. Ele é muito importante para a melhoria do blog.
Do not forget to leave your comments, criticism, praise, questions, etc.. It is very important for improving the blog.