日期:2014-05-17  浏览次数:20421 次

Failed to access IIS metabase??
问题:
Server Error in '/test' 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.

===========================、
我在虚拟机 XP中安装了 IIS 然后安装了DotNetFrameWork2.0 然后设置虚拟目录后,访问出现上面提示。
看网上的解决办法:

办法1:
运行cmd.

c:/> cd C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727

c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727> aspnet_regiis.exe -i

但是不管用 

办法2:
原因:IIS没有注册

解决办法:在CMD中进入目录C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727,运行aspnet_regiis

1、aspnet_regiis -ga administrator(administrator为当前用户)

C:\Documents and Settings\Administrator>cd c:\\windows\\microsoft.net\\framework\\v2.0.50727

2、aspnet_regiis -i (注册IIS)

3、iisreset /noforce (重启IIS)

也不行,请问是什么原因?

IIS设置中 目录安全性 允许匿名访问,用户名为本机器的登录账户






------解决方案--------------------
是不是IIS没有配置好的原因,
.aspx:C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,
.svc:C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
都配置了吗。
------解决方案--------------------
配置的问题,之前也出现过,你好好仔细检查一下,看是不是有哪一块疏忽了