HttpApplication.PreSendRequestContent 事件

定义

恰好在 ASP.NET 向客户端发送内容之前发生。Occurs just before ASP.NET sends content to the client.

public:
 event EventHandler ^ PreSendRequestContent;
public event EventHandler PreSendRequestContent;
member this.PreSendRequestContent : EventHandler 
Public Custom Event PreSendRequestContent As EventHandler 

注解

PreSendRequestContent 事件可能发生多次。The PreSendRequestContent event may occur multiple times.

有关如何处理事件的详细信息,请参阅处理和引发事件For more information about how to handle events, see Handling and Raising Events.

警告

不要将 PreSendRequestContent 与实现 IHttpModule的托管模块一起使用。Do not use PreSendRequestContent 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!Iiscore 中的 W3_CONTEXT_BASE:: GetIsLastNotification + 68 导致了访问冲突异常(0xC0000005)。For example, iiscore!W3_CONTEXT_BASE::GetIsLastNotification+68 in iiscore.dll has caused an access violation exception (0xC0000005).

适用于

另请参阅