大家好,当我通过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/