当前位置:网站首页>ASP. Net MVC - resource cannot be found error - asp Net MVC – Resource Cannot be found error
ASP. Net MVC - resource cannot be found error - asp Net MVC – Resource Cannot be found error
2022-07-07 05:04:00 【fyin1314】
problem :
I am completely new to ASP.Net MVC. I am a ASP.Net MVC novice .I just created an MVC3 project in Visual Studio 2010. The view engine is razor. I was just in Visual Studio 2010 Creates one in MVC3 project . The view engine is a razor .When I just ran the application it gave the proper result in the browser. When I first ran the application , It gives the correct result in the browser .The URL is http://localhost:4163/ .URL by http:// localhost:4163 / .Then I applied “Set as Start Page” to Index.cshtml inside ~\\Views\\Home folder. Then I will “ Set to start page ” be applied to 〜\\ Views \\ Home In folder Index.cshtml.Then when I ran the application the url became http://localhost:4148/Views/Home/Index.cshtml and it said the resource cannot be found. Then when I run the application ,url Turned into http:// localhost:4148 / Views / Home / Index.cshtml , It said that the resource could not be found .What do I do to correct it? What can I do to correct it ?Where is the url mapping done? Where is the URL mapping completed ?
Global.asax file:Global.asax file :
using System.Web.Mvc;using System.Web.Routing;namespace TEST{public class MvcApplication : System.Web.HttpApplication{ public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); } public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); } } }Solution :
Reference resources : https://stackoom.com/en/question/czje边栏推荐
- Leetcode notes
- Ansible中的inventory主机清单(预祝你我有数不尽的鲜花和浪漫)
- ThinkPHP关联预载入with
- 想要选择一些部门优先使用 OKR, 应该如何选择试点部门?
- U++ 游戏类 学习笔记
- [Yugong series] go teaching course 005 variables in July 2022
- Analysis -- MySQL statement execution process & MySQL architecture
- PLC模拟量输出 模拟量输出FB analog2NDA(三菱FX3U)
- 【736. Lisp 语法解析】
- Time complexity & space complexity
猜你喜欢

Programmers go to work fishing, so play high-end!

A row of code r shows the table of Cox regression model

Pointer and array are input in function to realize reverse order output

【736. Lisp 语法解析】

No experts! Growth secrets for junior and intermediate programmers and "quasi programmers" who are still practicing in Universities

深入解析Kubebuilder

《四》表单

【愚公系列】2022年7月 Go教学课程 005-变量

C语言中函数指针与指针函数

Time complexity & space complexity
随机推荐
The most complete learning rate adjustment strategy in history LR_ scheduler
Using thread class and runnable interface to realize the difference between multithreading
[ArcGIS tutorial] thematic map production - population density distribution map - population density analysis
Ansible中的inventory主机清单(预祝你我有数不尽的鲜花和浪漫)
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
Why do many people misunderstand technical debt
《五》表格
Canteen user dish relationship system (C language course design)
Why JSON is used for calls between interfaces, how fastjson is assigned, fastjson 1.2 [email protected] Mapping relatio
Basic knowledge of road loss of 3GPP channel model
Analyse approfondie de kubebuilder
R descriptive statistics and hypothesis testing
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
[736. LISP syntax parsing]
Can I specify a path in an attribute to map a property in my class to a child property in my JSON?
In depth analysis of kubebuilder
Section 1: (3) logic chip process substrate selection
一文搞懂常见的网络I/O模型
A line of R code draws the population pyramid
U++ game learning notes