title: How do ASP.NET routing and IIS handler mappings interact?
body: <p>I think I understand how <a href="http://msdn.microsoft.com/en-us/library/cc668201.aspx" rel="nofollow">ASP.NET routing</a> works, and in general how the IIS handler mappings work, but I don't know how they work together. It says that the HttpHandler is mapped during the MapRequestHandler phase in the <a href="http://msdn.microsoft.com/en-us/library/bb470252.aspx" rel="nofollow">application life cycle</a>. And as far as I can tell, the UrlRoutingModule that implements ASP.NET routing runs at about that time as well. Both seem to examine the URL and determine the appropriate IHttpHandler to use for the request.</p>
  
  <p>So which one runs first? How do they communicate to one another? Which one will take precedence is both are trying to map the same URL?</p>
  
  <p>I have a feeling that setting HttpContext.Handler is involved but I don't know how.</p>