Create an MVC application:
- Launch Visual Studio and press Ctrl + Shift + N (or File > New > Project)
- Select ASP.NET Web Application in your preferred programming language (C# or VB), give the application a name, and select OK
- Select MVC and select OK. You can close the Your ASP.NET application tab.
- 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
- Select Build > Publish domain.name
- Do the following in the Publish Web dialog box:
- Profile: Select Custom. In the New Custom Profile pop-up box, enter a profile name, such as LocalIIS
- Publish method: File System
- Target location: C:/path/to/directory
- Select Next
- Settings: Keep all of the default settings
- 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.