Skip to content

Commit 9700b88

Browse files
yaananthmairaw
authored andcommitted
Add warning about usage of PreSendRequestHeaders and PreSendRequestContent (dotnet#4002)
* Add warning about usage of PreSendRequestHeaders see https://github.com/aspnet/Docs/pull/5054/files * PreSendRequestContent too * feedback
1 parent bacb1bd commit 9700b88

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xml/System.Web/HttpApplication.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,8 @@ This method provides extensibility to the ASP.NET pipeline to make it easy for d
20482048
The <xref:System.Web.HttpApplication.PreSendRequestContent> event may occur multiple times.
20492049
20502050
For more information about how to handle events, see [NIB: Consuming Events](http://msdn.microsoft.com/en-us/01e4f1bc-e55e-413f-98c7-6588493e5f67).
2051-
2051+
> [!WARNING]
2052+
> Do not use `PreSendRequestContent` with managed modules that implement `IHttpModule`. Setting these properties can cause issues with asynchronous requests. The combination of Application Requested Routing (ARR) and websockets might lead to access violation exceptions that can cause w3wp to crash. For example, iiscore!W3_CONTEXT_BASE::GetIsLastNotification+68 in iiscore.dll has caused an access violation exception (0xC0000005).
20522053
]]></format>
20532054
</remarks>
20542055
<altmember cref="E:System.Web.HttpApplication.PreSendRequestHeaders" />
@@ -2073,7 +2074,8 @@ This method provides extensibility to the ASP.NET pipeline to make it easy for d
20732074
20742075
## Remarks
20752076
For more information about how to handle events, see [NIB: Consuming Events](http://msdn.microsoft.com/en-us/01e4f1bc-e55e-413f-98c7-6588493e5f67).
2076-
2077+
> [!WARNING]
2078+
> Do not use `PreSendRequestHeaders` with managed modules that implement `IHttpModule`. Setting these properties can cause issues with asynchronous requests. The combination of Application Requested Routing (ARR) and websockets might lead to access violation exceptions that can cause w3wp to crash. For example, iiscore!W3_CONTEXT_BASE::GetIsLastNotification+68 in iiscore.dll has caused an access violation exception (0xC0000005).
20772079
]]></format>
20782080
</remarks>
20792081
<altmember cref="E:System.Web.HttpApplication.PreSendRequestContent" />

0 commit comments

Comments
 (0)