Exploring and Starting the MVC Website
Learn about the default behavior of an ASP.NET Core MVC website, start the project, and explore visitor registration functionalities.
Exploring the default ASP.NET Core MVC website
Let’s review the behavior of the default ASP.NET Core MVC website project template:
Step 1: In the Northwind.Mvc
project, expand the Properties
folder, open the launchSettings.json
file, and note the random port numbers (which will be different) configured for the project for the https and http profiles, as shown in the following settings:
{"iisSettings": {"windowsAuthentication": false,"anonymousAuthentication": true,"iisExpress": {"applicationUrl": "http://localhost:36439","sslPort": 44344}},"profiles": {"http": {"commandName": "Project","dotnetRunMessages": true,"launchBrowser": true,"applicationUrl": "http://localhost:5074","environmentVariables": {"ASPNETCORE_ENVIRONMENT": "Development"}},"https": {"commandName": "Project","dotnetRunMessages": true,"launchBrowser": true,"applicationUrl": "https://localhost:7029;http://localhost:5074","environmentVariables": {"ASPNETCORE_ENVIRONMENT": "Development"}},"IIS Express": {"commandName": "IISExpress","launchBrowser": true,"environmentVariables": {"ASPNETCORE_ENVIRONMENT": "Development"}}}}
Step 2: For the http profile, change the port number to 5000
, as shown in the following setting:
"applicationUrl": "http://localhost:5000",
Step 3: For the https profile, change the port numbers to 5001
for HTTPS and 5000
for HTTP, as shown in the following setting:
"applicationUrl": "https://localhost:5001; http://localhost:5000",
Step 4: Save the changes to the launchSettings.json
file.
Starting the MVC website project
Step 1: Start the website by clicking the “Run” button in the ...