2009-07-31 8 views
17

¿Cómo resolver este problema?ASP.NET no tiene acceso a la metabase de IIS

Estoy usando asp.net 2.0, vs2005 e IIS 5.1.

Uso de Windows XP SP3.

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) +3591442 
    System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath) +9 
    System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +169 
    System.Web.CachedPathData.GetConfigPathData(String configPath) +389 
    System.Web.CachedPathData.GetConfigPathData(String configPath) +243 
    System.Web.CachedPathData.GetApplicationPathData() +68 
    System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3536567 
    System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189 
+1

¿Has probado la solución sugerida que IIS le da - http://support.microsoft.com/?kbid=267904? –

Respuesta

26

Los derechos del usuario ASPNET no se han configurado correctamente.

¿Qué versión de ASP.NET está ejecutando?

tratar

Start -> Run 
Type cmd <HIT RETURN> 
Type c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i <HIT RETURN> 

o como se sugiere

aspnet_regiis.exe -ga ASPNET 
+0

Gracias ... acabas de salvarme el día. :) –

+0

@ DD59 - aspnet_regiis.exe -ga ASPNET funciona perfectamente. Muchas gracias :) – picnic4u

3

intente ejecutar aspnet_regiis -i desde el directorio dotnet. Tiene una forma de arreglar las cosas.

+0

He tenido suerte con esta solución en el pasado con un problema similar. – darthnosaj

13

Ejecutar asnet_regiis con la opción -i podría no ser suficiente, ya que la razón podría ser la falta de derechos de acceso de la Metabase de IIS para la cuenta de ASPNET.

Yo sugeriría que se ejecuta con la opción -ga:

aspnet_regiis.exe -ga ASPNET 

Como comentario general, este problema se producirá si se instala Visual Studio y/o .Net Framework antes de instalar IIS.

+1

Intentó '-i' que no funcionó, pero' -ga ASPNET' hizo el truco. Gracias. –

+0

Gracias ... acabas de salvarme el día. :) –

+0

Gracias - ese fue el problema! – bernhardrusch

0

sólo tiene que ejecutar lo siguiente desde el cmd

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

Cuestiones relacionadas