IIS与ASP什么关系

来源:互联网 发布:广域网优化设备 编辑:程序博客网 时间:2024/04/28 11:39

 IIS根据ISAPI的映射将.aspx等请求转到ASP处理,但是html请求是有谁来处理呢,如果是IIS处理,那么为什么在给ASP应用设置了form验证以后,对html的首次请求也会转到form验证

 

http://msdn.microsoft.com/en-us/library/ms178473.aspx 有这么一段描述

Stage

Description

User requests an application resource from the Web server.

The life cycle of an ASP.NET application starts with a request sent by a browser to the Web server (for ASP.NET applications, typically IIS). ASP.NET is an ISAPI extension under the Web server. When a Web server receives a request, it examines the file-name extension of the requested file, determines which ISAPI extension should handle the request, and then passes the request to the appropriate ISAPI extension. ASP.NET handles file name extensions that have been mapped to it, such as .aspx, .ascx, .ashx, and .asmx.

Note:

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.

 

我创建了一个应用,改成form验证,添加了一个htm页面,首次请求htm页面,发现也会被转到form验证所指定的登录页面。

为什么会出现这种情况