我在谷歌搜索和搜索过,我找不到任何看似适用于我的情况的东西,更不用说解决问题了.我试图导航到我的网站中的哪个地址并不重要(即使是不存在的地址也不会给出这个错误而不是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
Run Code Online (Sandbox Code Playgroud)
更新:我在发布此内容后几分钟后回到了网站 - 没有对代码或配置进行任何更改 - 错误消失了.我真的很困惑,但它不再是一个问题.不确定应该对这个问题做些什么.
ker*_*rli 230
在我的情况下重启IIS解决了同样的问题.似乎在IIS中失败了.也不值得我恐慌.
IIS 7.5,顺便说一句.
小智 131
我在IIS 7下遇到了同样的问题(MVC 4).事实证明,App Pool身份没有对网站路径的正确授权.
小智 27
今天,当我重命名托管我的MVC应用程序的默认网站时,我也开始收到该错误.但我重新启动了IIS,问题得到了解决.
我也有同样的问题。就我而言,我正在使用 InstalledSheild / InstalledAware 来设置 Web 服务。安装程序运行后出现上述错误,在解决问题时检查,发现安装程序运行后II的默认网站路径被删除。
所以我只是添加路径如下步骤。
归档时间: |
|
查看次数: |
166181 次 |
最近记录: |