Skip to content

Commit 7094c4a

Browse files
The static HttpContext.Current property returns null when the calling-thread is not the same thread that was associated with the current HTTP request/response.
Add a workaround for it when called from objects with UseBigStack enabled.
1 parent d04b027 commit 7094c4a

File tree

1 file changed

+3
-0
lines changed
  • dotnet/src/dotnetframework/GxClasses/Middleware

1 file changed

+3
-0
lines changed

dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,6 +2281,9 @@ protected virtual void sendSpaHeaders()
22812281
private void webExecuteWorker(object target)
22822282
{
22832283
HttpContext httpContext = (HttpContext)target;
2284+
#if !NETCORE
2285+
HttpContext.Current = httpContext;
2286+
#endif
22842287
try
22852288
{
22862289
webExecuteEx(httpContext);

0 commit comments

Comments
 (0)