Have a look at this article as well
http://blogs.msdn.com/b/tmarq/archive/2010/04/01/asp-net-4-0-enables-routing-of-extensionless-urls-without-impacting-static-requests.aspx[
^]
IIS inspects the incoming request and looks up the handler for the type, most items are mapped into aspnet_isapi.dll. IIS -> Virtual Directory -> Configuration -> Mappings
Quote:
URLs are mapped to handlers by IIS when the request is initially received. I'll refer to the ASP.NET handlers as managed handlers, and everything else as unmanaged handlers. A request with a managed handler will enter ASP.NET and be processed by the various managed modules in the pipeline. On IIS 6, a request with an unmanaged handler won't be processed by managed code. On IIS 7, a request with an unmanaged handler, also, won't be processed by managed code, at least not by default.
I'm just going to repeat a lot of what is in the article, have a read through...but it's along the lines of
IIS receives Request -> Determine Mapping for Request -> Pass Request to Managed Code -> Look up route table .. etc etc