Create your first MVC web application in Visual Studio

Home > Search
  by

Create an MVC application:

  1. Launch Visual Studio and press Ctrl + Shift + N (or File > New > Project)
  2. Select ASP.NET Web Application in your preferred programming language (C# or VB), give the application a name, and select OK
  3. Select MVC and select OK. You can close the Your ASP.NET application tab.
  4. Press Ctrl F5. The default Your ASP.NET application page is displayed. A random port number is used, meaning the site is not using IIS.

Publish the application to local IIS

  1. Select Build > Publish domain.name
  2. Do the following in the Publish Web dialog box:
    1. Profile: Select Custom. In the New Custom Profile pop-up box, enter a profile name, such as LocalIIS
    2. Connection:
      • Publish method: File System
      • Target location: C:/path/to/directory
      • Select Next
    3. Settings: Keep all of the default settings
    4. Preview: Publish

The default Your ASP.NET application page is displayed. The URL should be something similar to localhost/MVCtest. Using localhost/MVCtest/Home/Index will produce the same Hello World page.

 

 

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments