【发布时间】:2011-09-08 22:27:52
【问题描述】:
我在 Google 上进行了搜索和搜索,但我找不到任何似乎适用于我的情况的东西,更不用说解决问题了。我尝试导航到我网站中的哪个地址都没有关系(即使不存在的地址也会给出此错误而不是 404),我会收到完全相同的消息(路径始终为“/”)。有什么想法吗?
Server Error in '/' Application.
Failed to map the path '/'.
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.InvalidOperationException: Failed to map the path '/'.
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:
[InvalidOperationException: Failed to map the path '/'.]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +336
[HttpException (0x80004005): Failed to map the path '/'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11556592
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4813333
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
更新:我在发布此内容几分钟后回到了该网站——没有对代码或配置进行任何更改——并且错误消失了。我真的很困惑,但这已经不是问题了。
【问题讨论】:
-
感谢您的错误信息。 IIS 或您的 ASP.NET 应用程序有问题(打赌这个)。您将需要发布您的代码,告诉我们更多有关问题的信息。您的多少网站受到影响?你最近做了哪些改变?问题是从什么时候开始的?
-
您的 web.config 文件或 .asax 文件中有任何内容吗?
-
您是否修改了虚拟目录或 IIS 应用程序池的属性?您是否尝试过重新启动 IIS?服务器上是否仍然存在所有适当的文件?
-
同样的事情发生在我身上。我让它坐下来,然后又回来了,它很好。保留问题以供参考。