加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

ASP.NET MVC页面不会加载并说“找不到资源”

发布时间:2020-12-16 00:35:41 所属栏目:asp.Net 来源:网络整理
导读:我有一个问题,我试图打开我的ASP.NET MVC应用程序,但我得到ASP.NET错误页面说: Server Error in ‘/’ Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have b
我有一个问题,我试图打开我的ASP.NET MVC应用程序,但我得到ASP.NET错误页面说:

Server Error in ‘/’ 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: /EventScheduler/account.aspx/login

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053**

我使用这个博客文章的URL技巧,这就是为什么我的URL中有.aspx:

http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

它在我的另一个沙箱服务器(而不是开发机器)上工作,现在我只是把它作为新的虚拟目录部署到我的生产站点,但由于某种原因,它似乎实际上是在寻找一个.aspx文件。

有任何想法吗?我想我一定要忘记一步。

解决方法

在构建MVC应用程序时,我遇到了同样的错误。默认使用URLRoute设置进行导航。如果从任何引发此错误的cshtml页面选择了Set as Statrup Page属性。因为总是有路由到Global.asax文件下的当前页面。 查看Statrup Path的项目属性并将其删除。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读