gpt4 book ai didi

c# - 谁在 ASP.Net MVC Pipeline 中先执行?

转载 作者:行者123 更新时间:2023-11-30 19:56:41 24 4
gpt4 key购买 nike

我对在 IIS 7.0 中如何处理请求的理解如下:

  1. 当请求进入 IIS 时,URLRoutingModule 对其进行处理。
  2. 如果 ÙRLRoutingModule 找到无扩展名的 URL(在 RouteTable 中),那么它会映射到相应的 Controller 。

但是,我找不到以下问题的答案。

  1. 以前,我研究过 aspnet_isapi.dll 处理所有 ASP.NET 相关事件。那么,在 HTTP 管道中,哪个先执行?[URLRoutingModule 或 ASPNET_ISAPI.DLL]

  2. ASPNET_ISAPI.DLLHTTP 处理程序 还是ISAPI 扩展

(我读过http handler 可以通过派生自IHttpHandler 来实现,而要编写isapi 扩展,我们需要用C 编写非托管代码/C++)

最佳答案

In the HTTP Pipeline, which gets executed first ? [URLRoutingModule or ASPNET_ISAPI.DLL]

ASPNET_ISAPI.DLL 首先执行。它将控制转移到托管的 ASP.NET 运行时并在必要时调用 URLRoutingModule

Is ASPNET_ISAPI.DLL a HTTP Handler or a ISAPI Extension?

它是一个 ISAPI 扩展:

来自 MSDN :

ASP.NET functionality is contained in an ISAPI dll called Aspnet_isapi.dll.

HTTP 处理程序是 托管 处理程序,由 ASP.NET 运行时调用。

来自 HTTP Handlers and HTTP Modules Overview :

An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application.

关于c# - 谁在 ASP.Net MVC Pipeline 中先执行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33155275/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com