我在 ASP.NET线程,但没有响应.
所以我必须在这里问一下,说明:
so I have to ask here, Description:
场景
平台:Visual Studio 2015,
platform: Visual studio 2015,
framework:框架4.5
framework: framework 4.5
project:使用HttpTaskAsyncHandler的ashx,并插入IHttpModule
project : ashx with HttpTaskAsyncHandler, and plug IHttpModule
问题:
触发OnPreSendRequestHeaders时,HttpContext.Current为null.似乎响应线程上下文已更改.
when the OnPreSendRequestHeaders is triggered, the HttpContext.Current is null. it's seems like the response thread context has been changed.
请帮助我,谢谢.
推荐答案
您好CrazyOldPotato,
Hi CrazyOldPotato,
谢谢您在这里发布.
我们不是ASP.NET的专家,根据我的搜索,您可以检查以下链接.
We are not the experts for ASP.NET, based on my search, you could check the following link.
stackoverflow/questions/276355/can -i-access-session-state-from-an-httpmodule
stackoverflow/questions/1572283/httpcontext-current-session-is-null-in-a-module-i-dont-have-access-to
我希望这会有所帮助.
最好的问候,
温迪
更多推荐
我的IHttpModule无法访问HttpContext Current
发布评论