HttpApplication.PreSendRequestHeaders 事件
定义
恰好在 ASP.NET 向客户端发送 HTTP 标头之前发生。Occurs just before ASP.NET sends HTTP headers to the client.
public:
event EventHandler ^ PreSendRequestHeaders;
public event EventHandler PreSendRequestHeaders;
member this.PreSendRequestHeaders : EventHandler
Public Custom Event PreSendRequestHeaders As EventHandler
事件类型
注解
有关如何处理事件的详细信息,请参阅 处理和引发事件。For more information about how to handle events, see Handling and Raising Events.
警告
不要将用于 PreSendRequestHeaders 实现的托管模块 IHttpModule 。Do not use PreSendRequestHeaders with managed modules that implement IHttpModule. 设置这些属性可能会导致异步请求出现问题。Setting these properties can cause issues with asynchronous requests. 应用程序请求路由 (ARR) 和 websocket 的组合可能会导致访问冲突异常,这可能会导致 w3wp.exe 崩溃。The combination of Application Requested Routing (ARR) and websockets might lead to access violation exceptions that can cause w3wp to crash. 例如,iiscore!W3_CONTEXT_BASE:: GetIsLastNotification + 68 in iiscore.dll 导致了访问冲突异常 (0xC0000005) 。For example, iiscore!W3_CONTEXT_BASE::GetIsLastNotification+68 in iiscore.dll has caused an access violation exception (0xC0000005).