错误详细信息
erver Error in '/accident' 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
解决方案
1. cmd
2. cd C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727
3. aspnet_regiis /u
4. aspnet_regiis /r
5. aspnet_regiis -i
6. iisreset /noforce
7. 运行 regedit → 打开注册表 → 找到HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/aspnet_state /Parameters 节点 → 将 AllowRemoteConnection 的键值设置成“1”(1 为允许远程电脑的连接,0 代表禁止)→ 设置 Port (端口号)
8. 开启 ASP.NET State Service
右键点击“我的电脑”→ 管理 → 服务与应用程序 → 服务 → 双击“ASP.NET State Service” → 启动(可设为“自动”)
操作详细:
C:/Documents and Settings/Administrator>cd c://windows//microsoft.net//framework//v2.0.50727
C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727>aspnet_regiis -ga administrator
Start granting administrator access to the IIS metabase and other directories us
ed by ASP.NET.
Finished granting administrator access to the IIS metabase and other directories
used by ASP.NET.
C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727>aspnet_regiis -lv
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 -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 -lv
2.0.50727.0 Valid (Root) C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/as
pnet_isapi.dll
C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727>iisreset /noforce
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727>
IIS问题
1. 运行: regsvr32 %windir%/system32/vbscript.dll
2. 运行:msdtc -resetlog
3. 重装IIS