ASP.NET Routing Not Working in IIS

After deploying a brand new website to IIS on Windows Server 2008 R2, I encountered numerous issues.

First, the web pages had no no styling. I could "View Source" and see that the code was correct, and I could browse to the folder containing the style sheets (bootstrap, my new obsession) and bring up the style sheet itself, but the application couldn't find the style sheets at run time on its own.

Next, none of the links worked. The page "StudentsList", which should bring up "StudentsList.aspx" returned a HTTP 404 status.

After futzing around a bit, it dawned on me that both issues stemmed from routing problems.

In no time, I found several suggestions -- including good ol' Rick Strahl's blog -- most of which pointed to the same fix. Add the runAllManagedModulesForAllRequests attribute to the <modules> tag of the <system.WebServer> section of the web.config file.

See Strahl's entry for more details:

https://weblog.west-wind.com/posts/2011/Mar/27/ASPNET-Routing-not-working-on-IIS-70



Comments

Popular posts from this blog

Using Reference Aliases

List of Visual Studio Keyboard Shortcuts