I m fairly new to C# programming in Visual Studio 2017 and I am having issue with building my view page on local host. getting below error.
服务器/应用。
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/Random.cshtml
the home page loads on local host, it s the view page that does not. below what I have done so far and still not resolved the issue.
In control pane > programmes >特恩多德视窗上或外面。 我在“因特网信息服务”(IIS 6)下打了所有箱子。
在我的视觉演播室项目中,房地产——改变了港口号码,与当地IIS进行了不同的开端,没有进行这些改动。
现在我几乎不忘其他事情。 我在网上寻求解决这一问题,并尝试了与我的问题有关的一切,但没有奏效。 至今已超过7小时,试图确定这一点
我遵循了在线课程,与我的课程辅导员订立完全相同的编码,对辅导员而不是对我进行罚款。
我的控制员在此编码:
示范网页:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Vidly.Models
{
public class Movie
{
public int Id { get; set; }
public string Name { get; set; }
}
}
主计长:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Vidly.Models;
namespace Vidly.Controllers
{
public class MoviesController : Controller
{
// GET: Movies
public ActionResult Random()
{
var movie = new Movie() { Name = "Shrek!" };
return View(movie);
}
}
}
view page (random):
@model Vidly.Models.Movie
@{
ViewBag.Title = "Random";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>@Model.Name</h2>