本文介绍了HttpContext.Current在线程中为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在尝试在我的asp.net应用程序中使用线程作为方法。但在线程方法中,它将HttpContext.Current作为null。有没有解决方案。



在页面加载中:

Hello,

I am trying to use thread for a method in my asp.net application. But in thread method its giving HttpContext.Current as null. Is there any solution for this.

In pageload :

Thread t1 = new Thread(new ThreadStart(populateProfile));
 t1.Start();

在populateProfile方法中,HttpContext为null。



谢谢,

In populateProfile method HttpContext is null.

Thanks,

推荐答案



这篇关于HttpContext.Current在线程中为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 04:34
查看更多