发布网站:无法找到资源错误

时间:2012-08-22 12:38:42

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

大家好,当我通过IIS发布我的网站时,我得到了这个错误,你可以在下面看到

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

1 个答案:

答案 0 :(得分:1)

这一位:Requested URL: /WebCity/Views/Home/Index.cshtml表示它正在寻找不应该的特定网址。

即。您似乎已导航到http://domain.com/WebCity/Views/Home/Index.cshtml,而不仅仅是http://domain.com/WebCity/或其应有的任何内容。

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

如果未安装框架,请不要担心。请参阅此处了解Phil Haack关于如何bin deployhttp://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx

的说明