2
votes

I've started working on my master's project and decided to try something new and use ASP.NET MVC 2. I have Windows 7 Pro and Visual Studio 2010.

I've been following this tutorial and what's driving me insane is that I cannot even get past the first step. I setup my project exactly as the tutorial says, start debugging and all I get is:

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404.

What the hell? I checked the default MVC application that VS01 builds when you choose "ASP.NET MVC 2 App" instead of "ASP.NET MVC 2 Empty App" and it works. I am clueless...

3

3 Answers

6
votes

Short answer, it probably is "working."

If you are using the "Empty App" project template, the behavior you see is exactly what you should expect. In your global.asax, you will see a global route and a default controller set to "Home". However, in an empty project, you have no controllers or views so you get a 404.

2
votes

In an Empty App, you have no Controllers or Views defined, that's why you get that error.

Try comparing to the normal MVC 2 App starting project and create a default Controller & View.

0
votes

You need to create a controller and ensure your route table is mapped to it correctly.