没有找到您要查的资源 [英] The resource cannot be found

查看:167
本文介绍了没有找到您要查的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在选择任何页面之前,它默认显示主页。当我选择一个特定页面时,它显示此错误。它是由mvc3(Razor)开发的。任何机构都可以帮我在Razor首页运行,或者我该如何回去?







'/'应用程序中的\Server错误。

-------------------------------- ------------------------------------------------ <无线电通信/>


无法找到资源。

描述:HTTP 404.您要查找的资源(或其中一个依赖项)可能已被删除,名称已更改或暂时不可用。请查看以下网址,确保拼写正确。



请求的URL:/Views/home/Index.cshtml





------------------------------------------------- -------------------------------

版本信息:Microsoft .NET Framework版本:4.0。 30319; ASP.NET版本:4.0.30319.272

Hi All,
Before selecting any page it is by default showing the home page. when i select one partiicular page it is showing this error. it is developed by mvc3 (Razor). Can any body help me in Razor which page runnig first or how can i go back?



\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: /Views/home/Index.cshtml


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

推荐答案

如果您没有在Web项目的属性下设置起始页面,则可能出现这种情况。所以这样做:





  • 右键单击你的mvc项目
  • 选择属性
  • 选择Web选项卡
  • 选择特定页面
  • 假设您有一个名为 HomeController的控制器和一个名为 Index 的动作方法,在特定页面单选按钮对应的文本框中输入home / index。
One reason this could occur is if you don't have a start page set under your web project's properties. So do this:


  • Right click on your mvc project
  • Choose "Properties"
  • Select the "Web" tab
  • Select "Specific Page"
  • Assuming you have a controller called HomeController and an action method called Index, enter "home/index" in to the text box corresponding to the "Specific Page" radio button.


简单解决方案



simple solution

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. 





简单例如。在视图中我有一个 AHU 文件夹,并且我使 index.cshtml 页面此页面正常运行,但我将此文件夹设为新页面 add.cshtml 并且现在运行我得到错误(上面)。这种类型的错误解决方案是请检查控制器页面中的方法/功能,如



simple eg. in view i have a AHU folder and i make index.cshtml page this page run properly but i make this folder new page add.cshtml and now run i get Error (above).This type error solution is please check method/function in your controller page like

public ActionResult add()//your view page
       {
           return View();
       }





我希望你得到答案



I hope you get your answer


这篇关于没有找到您要查的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆