我可以在后台线程中访问会话吗? [英] Can I access sessions in background thread?
本文介绍了我可以在后台线程中访问会话吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#.net Web应用程序的后台线程中访问项目会话?
How can i access my project sessions in background thread in my c#.net webapplication?
它为我提供了会话值= null.
it gives me session value = null.
有什么主意吗?
推荐答案
线程池中的线程由系统管理.这些线程未绑定到当前请求.因此,会话不适用于他们.
Threads in the thread pool are managed by the system. These threads are not bound to the current request. Therefore, Session is not available for them.
这篇关于我可以在后台线程中访问会话吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文