ASP. NET Core Chinese Document Chapter 2 Guide (4.1) ASP. NET Core MVC and objective A, mvc0000a

Source: Internet
Author: User

ASP. NET Core Chinese Document Chapter 2 Guide (4.1) ASP. NET Core MVC and objective A, mvc0000a

Reference page:

Http://www.yuanjiaocheng.net/ASPNET-CORE/projectjson.html

Http://www.yuanjiaocheng.net/ASPNET-CORE/core-configuration.html

Http://www.yuanjiaocheng.net/ASPNET-CORE/core-middleware.html

Http://www.yuanjiaocheng.net/ASPNET-CORE/core-exception.html

Http://www.yuanjiaocheng.net/ASPNET-CORE/core-static-files.html

Original article: Getting started with ASP. NET Core MVC and Visual Studio
By Rick Anderson
Translation: Lyrics)
Proofreading: AlexLEWIS, Xia shenbin, and Zhang Shuo)

This tutorial will show you how to use Visual Studio 2015 to build an ASP. NET Core MVC Web application.

Install Visual Studio and. NET Core
  • Install Visual Studio Community 2015. Select Community to download and execute the default installation. Skip this step if Visual Studio 2015 is already installed.
    • Visual Studio 2015 installer Homepage
  • Install. NET Core + Visual Studio
Create a Web application

From Visual StudioStart Page)ClickNew Project).

You can also use the menu to create a new project. ClickFile> New> Project).

Follow these stepsNew Project)Dialog box settings:

  • In the left pane, clickWeb
  • In the middle pane, clickASP. NET Core Web Application (. NET Core)
  • Name the project "MvcMovie" (it is very important to name the project "MvcMovie". When you copy the code, the namespace will match)
  • ClickOK)

InNew ASP. NET Core Web Application-MvcMovieIn the dialog box, clickWeb Application)And then clickOK).

Visual Studio provides a default template for the created MVC project. Enter the project name and select some options to obtain an application. This is a simple "Hello World! "Project, a good start.

PressF5Run the application in Debug mode, or pressCtrl + F5Run in non-Debug mode.

  • Visual Studio starts IIS Express and runs your application. NoteLocalhost: Port #Not likeexample.com. That's becauselocalhostAlways point to the local computer. In this example, it is also the computer that runs your application. When Visual Studio creates a Web project, the Web server uses a random port. The port number is 1234, as shown in. When you run this application, you may see different port numbers.
  • PassCtrl + F5(In non-debug mode) start this application to allow you to make code changes, save files, refresh the browser, and then view the code changes. Many developers prefer non-debug mode to quickly start applications and view changes.
  • You can useDebugSelect debug or non-Debug to start the application.

  • You can clickIIS ExpressButton to debug the application

The default template providesHome, Contact, About, RegisterAndLog inLink. These links are not displayed in the following browser image. Depending on the size of your browser, you may need to click the navigation icon to display them.

In the next section of this tutorial, we will learn MVC and try to write some code.

Revision history

Returned directory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.