Reputation: 12142
So Im reading that:
If a file name extension has not been mapped to ASP.NET, ASP.NET will not receive the request. This is important to understand for applications that use ASP.NET authentication. For example, because .htm files are typically not mapped to ASP.NET, ASP.NET will not perform authentication or authorization checks on requests for .htm files. Therefore, even if a file contains only static content, if you want ASP.NET to check authentication, create the file using a file name extension mapped to ASP.NET, such as .aspx.
which I understand given the obvious .htm <> ASP.net ISAPI mapping in the webserver but what about routes in a route table? I'm not mapping those in the web server so how does the web server know to forward those URLs to ASP.Net??
Upvotes: 0
Views: 107
Reputation: 34846
So there are at least two pieces to this question:
The first is if you are running in IIS
in classic mode
versus integrated mode
. Classic mode
will make things behave like IIS 6, where everything is an ISAPI filter
, including ASP.NET itself. Integrated
mode takes advantage of the fact that IIS 7 was rewritten from the ground-up and now uses modules instead.
Secondly, the short answer of why IIS
knows how to forward a URL
to ASP.NET
is the Routing Module
in the IIS 7+ pipeline; ISAPI filters
are now part of the ISAPI Filters Module
.
For a visual description of how the IIS 7+ pipeline works from a Routing/URL-Rewriting
perspective, read IIS URL Rewriting and ASP.NET Routing
So the good news is if you are very much attached to the ISAPI filter
approach you can use the classic mode
of IIS
.
Upvotes: 1