0

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??

4

1 回答 1

1

所以这个问题至少有两个部分:

第一个是如果你IISclassic modevs中运行integrated modeClassic mode将使事情表现得像 IIS 6,其中一切都是ISAPI filter.NET,包括 ASP.NET 本身。Integrated模式利用了 IIS 7 从头开始​​重写并且现在使用模块的事实。

其次,为什么IIS知道如何转发URL到的简短答案ASP.NETRouting Module在 IIS 7+ 管道中;ISAPI filters现在是一部分ISAPI Filters Module

有关 IIS 7+ 管道如何从一个Routing/URL-Rewriting角度工作的直观描述,请阅读IIS URL 重写和 ASP.NET 路由

所以好消息是,如果您非常喜欢ISAPI filter可以使用classic modeof的方法IIS

于 2013-06-30T15:38:01.753 回答