我的IHttpModule无法访问HttpContext Current

编程入门 行业动态 更新时间:2024-10-17 19:27:06
本文介绍了我的IHttpModule无法访问HttpContext Current的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 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

本文发布于:2023-11-17 12:27:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609999.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法访问   IHttpModule   Current   HttpContext

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!