.net - 发布网站: the resource cannot be found error

标签 .net asp.net-mvc-3 iis error-handling publishing

大家好,当我通过ISS发布网站时,出现此错误,如下所示

Server Error in '/WebCity' Application.
--------------------------------------------------------------------------------

The resource cannot be found. 
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /WebCity/Views/Home/Index.cshtml

最佳答案

这一点:Requested URL: /WebCity/Views/Home/Index.cshtml表示它正在寻找该特定的URL,而不应该这样做。

即看起来好像您已导航到http://domain.com/WebCity/Views/Home/Index.cshtml而不是http://domain.com/WebCity/或其他内容。

您在浏览器中输入了错误的URL,或者服务器上未安装MVC Framework。

如果未安装框架,请不要担心。请参阅此处以获取Phil Haack关于如何对其进行bin deploy的注释:http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx

关于.net - 发布网站: the resource cannot be found error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12073354/

相关文章:

c# - 在 IIS 7 上使用 HttpHandler 取消请求验证

c# - 如何使用 Dapper 插入 DateTime(或 DateTime2)?

c# - DbContext 查询性能较 ObjectContext 差

c# - 如何使用分页渲染对象树?

php - 如何让 shell_exec 在 IIS 6.0 上运行

http - URL 中的 %09 导致 IIS(HTTP.SYS?)立即返回 HTTP 400

.net - 如何查找具有特定范围选项的所有变量?

c# - 仅参数路由总是被触发 MVC3

c# - Entity Framework 4.1 的 SQL "not in"语法

asp.net-mvc-3 - MVC3 C# 潜在危险的请求错误