ASP.NET 4.0 URL routing 404 problems with IIS7

by Scott 21. April 2010 13:15

As I described before, I love the new routing feature in ASP.NET 4.0.  I succesfully converted my code from Intelligencia over to the built in routing.  The site ran great locally, but when I deployed to IIS7, I got 404's on every page that didn't have an extension.  Those pages were my routed product pages.

Some googling led to to add a line to my web.config file.  Here is is:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>

This apparently forces IIS to invoke the routing module.  I found no mention of this anywhere and was under the assumption I didn't have to modify any config files.  Hope this helps somebody.

Here are some sources where I found this:

http://forums.asp.net/t/1523639.aspx
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Tags:

SEO

Comments

5/5/2010 1:22:07 PM #

Eric

This saved me a ton of time - thank you.  

Eric United States | Reply

5/5/2010 1:25:23 PM #

Scott

Great to hear Smile  

Scott United States | Reply

5/20/2010 12:07:40 AM #

Gilad

saved my day!  this post shuld be on the front page of the iis 7 site Smile

scott , you are the man

Gilad Israel | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



About the author

Hi, I'm Scott.  My company develops in C#/ASP.NET/Silverlight and and creates e-commerce web sites for small business.  Visit our corporate site, Gildner Solutions.  We are working on a brand new one now.

RecentComments

Comment RSS