首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >ASP.NET没有访问IIS元数据库的权限

ASP.NET没有访问IIS元数据库的权限
EN

Stack Overflow用户
提问于 2009-07-31 08:43:57
回答 4查看 17.7K关注 0票数 17

如何解决这个问题?

我使用的是IIS2.0、vs2005和asp.net 5.1。

使用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
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2009-07-31 08:46:58

尚未正确设置ASPNET用户的权限。

您运行的是什么版本的ASP.NET?

试一试

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

或如建议的那样

aspnet_regiis.exe -ga ASPNET
票数 26
EN

Stack Overflow用户

发布于 2010-05-20 23:07:46

使用-i选项运行asnet_regiis可能还不够,原因可能是ASPNET帐户缺乏适当的IIS元数据库访问权限。

我建议使用-ga选项运行它:

aspnet_regiis.exe -ga ASPNET

一般来说,如果在安装.Net之前安装Visual Studio和/或installing,就会出现这个问题。

票数 13
EN

Stack Overflow用户

发布于 2009-07-31 08:48:13

尝试从dotnet目录运行aspnet_regiis -i。它有一种解决问题的方法。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1211347

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档