views:

194

answers:

4

Hi,

I expected this would also map the default homepage as in http://localhost/ but it is not hit.

RouteTable.Routes.Add(new Route("{Keyword}", new HomeHandler()));

Question is of course why not? I would like to map the root to some other page.

+1  A: 

I haven't tried this yet but try removing the default document from IIS's configuration. For IIS 7 this setting is in web.config:

<configuration>
 <system.webServer>
  <defaultDocument>
   <files>
    <clear />
   </files>
  </defaultDocument>
 </system.webServer>
</configuration>
devstuff
+1  A: 

Looks like I am also facing the same issue, how do we enable Routing on root and still allow default page to get executed?.

Vijay Rayapati
+1  A: 

The answer is somewhat complex. It was on IIS6 and we had to add a specific property. I cannot really remember what we did back then but you can google it, that's how I found it.

Dennis Decoene
It would be more useful to put in a link to what you found.
devstuff
A: 

Hi, does anybody have a better tip on this than "google it"? I'm having the same issue with IIS7.

Thanks! R