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.
The above issue is common to all ASP.NET developers with ASP.NET WebForm background. In order to browse the MVC application, you need to mention the path in the form like “http://localhost/YourControllerName/YourActionMethod" that is the url routing pattern specified by default.
Conclusion
Hope this article will help those who are news to MVC and solve the issue while hosting his/her application on local machine. Happy coding!