Michael Kniskern
Michael Kniskern

Reputation: 25280

Getting 404 error with ASP.NET MVC starter project

I just created a ASP.NET MVC project and was able to build and browse it using the Visual Studio Development Server.

When I tried to change from Visual Studio Development Server to my local IIS (IIS 5.1) under the project properties Web -> Server. I am able to browse to the default page, but when I browse to any other page I get a 404 error.

The root of my site and virtual directory is http://localhost/MyMvcApplication

Is there a different configuration when using IIS?

Upvotes: 0

Views: 1313

Answers (2)

Ropstah
Ropstah

Reputation: 17804

You have to setup wildcard mapping to the aspnet_isapi.dll (IIS site configuration). This means that every request to the server is parsed by the .NET DLL so that URL's can be rewritten (MVC heavily relies on URL rewriting).

Upvotes: 3

Related Questions