In this article I am going to discuss how to host an ASP.NET MVC Application on your local machine.
Most of the steps to deploy a web form application and MVC application are equivalent, but in some cases the developers confused it a bit (You can see step 3 for this confusion). Hope this article gives a nice overview on it. Prerequisite In order to explain the steps, I assume you have an ASP.NET MVC application that is ready to build without any error. Step 1: Publish your MVC application in a local file path using Publish option in Visual Studio.
Step 3: You are almost done! The only thing pending is you need to browse the website just published. This is where most of the ASP.NET developers (especially who is a newbie to ASP.Net MVC will know that what they were doing: Expand the Virtual directory, go to Views, click Switch to content view and select the cshtml file, right click on it and click Browse that throws 404 error in the browser.
Hands on ASP.NET GridView