zoukankan      html  css  js  c++  java
  • HTTPModule Event Execution Order?

    HTTPModule Event Execution Order?

    Does anyone know of a site or page, or know the order of execution for the events of the HTTPApplication class for HTTPModule event execution?

    I found the MSDN Documentation for all of the events, but it doesn't show a list of process steps and I haven't been able to find one.

    回答1

    Maybe this helps

    http://support.microsoft.com/kb/307985/en-us/

    An HttpApplication class provides a number of events with which modules can synchronize. The following events are available for modules to synchronize with on each request. These events are listed in sequential order:

    1. BeginRequest
    2. AuthenticateRequest
    3. AuthorizeRequest
    4. ResolveRequestCache
    5. AcquireRequestState
    6. PreRequestHandlerExecute
    7. PostRequestHandlerExecute
    8. ReleaseRequestState
    9. UpdateRequestCache
    10. EndRequest

    The following events are available for modules to synchronize with for each request transmission. The order of these events is non-deterministic.

    • PreSendRequestHeaders
    • PreSendRequestContent
    • Error

    See the article for full info.

    回答2

    MSDN Library documentation:

    Here are the events (in bold) and other steps in the request pipeline for ASP.NET 4.0:

    1. Validate the request, which examines the information sent by the browser and determines whether it contains potentially malicious markup.
    2. Perform URL mapping, if any URLs have been configured in the UrlMappingsSection section of the Web.config file.
    3. Raise the BeginRequest event.
    4. Raise the AuthenticateRequest event.
    5. Raise the PostAuthenticateRequest event.
    6. Raise the AuthorizeRequest event.
    7. Raise the PostAuthorizeRequest event.
    8. Raise the ResolveRequestCache event.
    9. Raise the PostResolveRequestCache event.
    10. [IIS 5.0/6.0] Based on the file name extension of the requested resource (mapped in the application's configuration file), select a class that implements IHttpHandler to process the request. If the request is for an object (page) derived from the Page class and the page needs to be compiled, ASP.NET compiles the page before creating an instance of it. [IIS 7.0] Raise the MapRequestHandler event. An appropriate handler is selected based on the file name extension of the requested resource. The handler can be a native-code module such as the IIS 7.0 StaticFileModule or a managed-code module such as the PageHandlerFactory class (which handles .aspx files).
    11. Raise the PostMapRequestHandler event.
    12. Raise the AcquireRequestState event.
    13. Raise the PostAcquireRequestState event.
    14. Raise the PreRequestHandlerExecute event.
    15. Call the ProcessRequest method (or the asynchronous version IHttpAsyncHandler.BeginProcessRequest) of the appropriate IHttpHandler class for the request. For example, if the request is for a page, the current page instance handles the request.
    16. Raise the PostRequestHandlerExecute event.
    17. Raise the ReleaseRequestState event.
    18. Raise the PostReleaseRequestState event.
    19. Perform response filtering if the Filter property is defined.
    20. Raise the UpdateRequestCache event.
    21. Raise the PostUpdateRequestCache event.
    22. [IIS 7.0] Raise the LogRequest event.
    23. [IIS 7.0] Raise the PostLogRequest event.
    24. Raise the EndRequest event.
    25. Raise the PreSendRequestHeaders event.
    26. Raise the PreSendRequestContent event.

    Note: The MapRequestHandler, LogRequest, and PostLogRequest events are supported only if the application is running in Integrated mode in IIS 7.0 and with the .NET Framework 3.0 or later.

    官方的文档

  • 相关阅读:
    python处理excel文件
    Python datetime模块
    OrderedDict 有序字典以及读取json串时如何保持原有顺序
    ansible 学习笔记
    nginx的location和rewrite
    实体机重装系统
    热词
    教育
    生活
    1、两数之和
  • 原文地址:https://www.cnblogs.com/chucklu/p/13333834.html
Copyright © 2011-2022 走看看