我刚刚使用Razor引擎创建了一个新的ASP.NET MVC 3项目.我在控制器文件夹中添加了一个控制器,然后在homController.cs我添加了一个视图.
View(index.cshtml)只有这个代码:
@{
ViewBag.Title = "Home";
}
<h2>Home</h2>
Run Code Online (Sandbox Code Playgroud)
当我开始调试时,它显示了这个错误:
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: /
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Run Code Online (Sandbox Code Playgroud)
有什么问题?