views:

269

answers:

1

By default the web.config file for MVC project have the following element:

<handlers>
  <remove name="MvcHttpHandler"/>
  <add name="MvcHttpHandler" preCondition="integratedMode" 
       verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler"/>
</handlers>

My problem is that my site returns 404.14, after knocking out all the usual suspects I changed the path (form the snippet above) attribute in the web.config to be "*" and voilà! MVC handler kicks in.

So my question is how does *.mvc even suppose to work? I mean my urls are http://mysite.com/home/index (or even only http://mysite.com/) there is no *.mvc in them.

Am I missing something?

+1  A: 

By changing the path you are telling the routing engine to add the .mvc extension to the Url. You probably do not have the .mvc extension mapped in IIS and receive an error.

See here on information about IIS and MVC especially if you are using IIS 6.0:

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Miyagi Coder
You were right, I was missing the handler for *.mvc, which is strange because I would expect that VS 2010 Beta 2 would do that for me... or maybe I Install IIS AFTER VS 2010.
Shay Erlichmen