One reason this could occur is if you don't have a start page set under your web project's properties. So do this:
- Right click on your mvc project
- Choose "Properties"
- Select the "Web" tab
- Select "Specific Page"
- Assuming you have a controller called
HomeController
and an action method called Index
, enter "home/index" in to the text box corresponding to the "Specific Page" radio button.
Now, if you launch your web application, it will take you to the view rendered by the HomeController's Index action method.
(or)
Simply, you could also open one of the controllers in your project and then hit on F5 or Ctrl + F5.
What's happening now is that, you are currently in your /Views/home/Index.cshtml view and you just hit on F5 or Ctrl + F5. In an mvc project, you cannot open a file w/ .cshtml extension directly as IIS cannot understand that. The controller is supposed to return a matching view from within the action method.
As a side-note also check if you have MVC 3 installed correctly. If my answer doesn't help, I am sorry.
Hope this helps!