Url Routing in IIS 7 hosting environment : ASP.NET

Posted on 2011-02-25
Last Modified: 2013-12-14

I am trying to implement ASP.NET URL routing using the System.Web.Routing. And this seems to work fine on my localhost however when I go live I am getting an IIS 7's 404 error (File not found). FYI the hosting uses Windows Server 2008 IIS7 and It has .NET Framework 3.5 SP1

I think this is making some difference in handling the routing mechanism. But I am not able to figure out whats exactly happening.

In Web.Config HttpModules  i have added the below setting

 <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Can anybody suggest how to resolve this.

Question by:GouthamAnand
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 13

Accepted Solution

agarwalrahul earned 250 total points
ID: 34978822

In the application's Web.config file, add the ASP.NET routing assembly to the assemblies element, as shown in the following example:

<add assembly="System.Web.Routing, Version=,

If the application runs under IIS 6.0 or IIS 7.0 Classic mode, add the UrlRoutingModule class to the httpModules element, as shown in the following example:

  <add name="UrlRoutingModule"
If the application runs under IIS 7.0 Integrated mode, add the UrlRoutingModule class to the modules element, as shown in the following example:

    <remove name="UrlRoutingModule" />
    <add name="UrlRoutingModule"
If the application runs under IIS 7.0 Integrated mode, add the UrlRoutingHandler class to the handlers element as shown in the following example:

    <add name="UrlRoutingHandler"
               System.Web, Version=,
               PublicKeyToken=b03f5f7f11d50a3a" />

also read link page for reference

Author Closing Comment

ID: 34980255
Thank for a timely reply. It is working fine in the server enviroment.

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question