CURRENT ARTICLE:  Building ASP.net Core MVC using Visual Studio
NEXT ARTICLE:   8 Lessons from Chinese Internet Superstars

Building ASP.net Core MVC using Visual Studio

Ervin Musngi MCSD // Last Updated: 12 July 2016

What is ASP.net Core? Check the previous blog here.

For this blog, I’ll be guiding you on how to create a simple ASP.net Core MVC project.  This will be a straight forward implementation, from creating up to running it locally.

So let’s start.

Install Visual Studio and .NET Core

Creating our first ASP.net Core Web App

 

A popup dialog will open:

  • In the left pane, tap Web
  • In the center pane, tap ASP.NET Core Web Application (.NET Core)
  • Name the project “MvcMovie” (It’s important to name the project “MvcMovie” so when you copy code, the namespace will match. )
  • Tap OK

 

 

Complete the New ASP.NET Core Web Application - MvcMovie dialog:

  • Tap Web Application
  • Clear Host in the cloud
  • Tap OK.

 

Visual Studio used a default template for the MVC project you just created, so you have a working app right now by entering a project name and selecting a few options. This is a simple “Hello World!” project, and it’s a good place to start,

 

Tap F5 to run the app in debug mode or Ctl-F5 in non-debug mode.

 

 

  • Visual Studio starts IIS Express and runs your app. Notice that the address bar shows localhost:port# and not something like example.com. That’s because localhost always points to your own local computer, which in this case is running the app you just created. When Visual Studio creates a web project, a random port is used for the web server. In the image above, the port number is 1234. When you run the app, you’ll see a different port number.
  • Launching the app with Ctrl+F5 (non-debug mode) allows you to make code changes, save the file, refresh the browser, and see the code changes. Many developers prefer to use non-debug mode to quickly launch the app and view changes.
  • You can launch the app in debug or non-debug mode from the Debug menu item:

 

You can debug the app by tapping the IIS Express button

 

 

The default template gives you working Home, Contact, About, Register and Log in links. The browser image above doesn’t show these links. Depending on the size of your browser, you might need to click the navigation icon to show them.

 

 

That's it, you now have a running ASP.net Core MVC app. For our next blog, Will be running down some coding and build a sample application.

 

Credit : https://docs.asp.net

 

 

ABOUT THE AUTHOR

Ervin
Musngi MCSD

Lead Developer of Seirim, Ervin focuses on project structure and architecture. Adding to that role, he monitors, assists and supervise ongoing projects to make sure we only release and deploy quality projects.

RECENTLY

Top Annual Cybersecurity Threat Summary Publications

Review of the top annually produced cybersecurity threat and intelligence trends covering 2023.

How to Overcome Team Conflicts and Delays in I.T. Projects

Discussion about how to overcome team conflicts and project delays in IT and web development projects.

Step by Step Cybersecurity Defense Setup and Tools for SME's

Follow these steps and consider these tools to get your company cyber secure.

Top 12 Social Media for Businesses in China

Top 12 social media for businesses to promote with in China

Top 10 Cybersecurity Best Practices for Website Owners

As a website owner, cybersecurity should be a top priority.

Our Favorite Quality Assurance Tools and Processes

QA takes work! We use the best tools and processes to make it easier.