我在谷歌上搜索了又搜,却找不到任何适合我的情况的东西,更别说解决问题了。不管我试图导航到网站中的哪个地址(即使不存在的地址也会出现这个错误,而不是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
更新: 我在发布这篇文章几分钟后回到了站点——没有对代码或配置做任何更改——错误消失了。我真的很困惑,但这已经不是问题了。