线程和会话对象

编程入门 行业动态 更新时间:2024-10-26 14:38:42
本文介绍了线程和会话对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在做一个asp应用程序,它在客户端和我的Intranet上的服务器之间上传和下载文件和 文件夹。要做到这一点,我有 创建线程,它运行正常,但我需要向用户显示 操作的进度,这就是问题所在。我尝试从线程内部访问会话 变量,以便在自动刷新的页面上显示它,但是我发现没有访问权限httpcontext 来自新线程内部。还有其他办法吗? 非常感谢。 - RobertoLópez Dpto。 Soporte Software EurosistemasInformáticosyComunicaciones,SL

Hi, I′m doing an asp application that uploads and downloads files and folders between the client and the server on my intranet. To do this I have create threads and it runs Ok but I need to show to the user the progress of the operation and here is the problem. I try to access to the Session Variables from inside the thread to show it on a page that automatically refresh, BUT, I have discovered that there is no access to the httpcontext from inside the new thread. Is there any other way to do this?? Thanks a lot. -- Roberto López Dpto. Soporte Software Eurosistemas Informáticos y Comunicaciones, S.L.

推荐答案

这是一篇文章: www.ftponline/vsm /2002_11...tures/chester/ - S. Justin Gengo,MCP Web开发人员 免费代码库: www。 aboutfortunate 混乱无序。 Nietzche "RobertoLópez" ; < RL **** @ eurosistemas>在消息中写道 新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ... Here''s an article: www.ftponline/vsm/2002_11...tures/chester/ -- S. Justin Gengo, MCP Web Developer Free code library at: www.aboutfortunate "Out of chaos comes order." Nietzche "Roberto López" <rl****@eurosistemas> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... 我正在做一个asp应用程序,它在客户端和我的Intranet上的服务器之间上传和下载文件和文件夹。要做到这一点,我有创建线程,它运行正常,但我需要向用户显示操作的进度,这是问题所在。我尝试从线程内部访问Session 变量,在一个自动刷新的页面上显示它,但是,我发现从内部无法访问httpcontext 新线程。还有其他办法吗? 非常感谢。 - RobertoLópez Dpto。 Soporte Software EurosistemasInformáticosyComunicaciones,SL Hi, I′m doing an asp application that uploads and downloads files and folders between the client and the server on my intranet. To do this I have create threads and it runs Ok but I need to show to the user the progress of the operation and here is the problem. I try to access to the Session Variables from inside the thread to show it on a page that automatically refresh, BUT, I have discovered that there is no access to the httpcontext from inside the new thread. Is there any other way to do this?? Thanks a lot. -- Roberto López Dpto. Soporte Software Eurosistemas Informáticos y Comunicaciones, S.L.

我刚读过这篇文章,但我需要的是访问会话 来自班级内的对象。这样做我alwais收到错误。 S。 Justin Gengo < SJ ***** @ aboutfortunate> escribiónenel mensaje 新闻:#m ************** @ TK2MSFTNGP11.phx.gbl ... I just readed this article but, what i need is to access to the session object from within a class. And doing it I alwais receive an error. "S. Justin Gengo" <sj*****@aboutfortunate> escribió en el mensaje news:#m**************@TK2MSFTNGP11.phx.gbl... 这里''一篇文章: http ://www.ftponline/vsm/2002_11...tures/chester/ - S. Justin Gengo,MCP Web开发人员 免费代码库: www.aboutfortunate 出于混乱,订单。Nietzche RobertoLópez < RL **** @ eurosistemas>在消息中写道新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ... Here''s an article: www.ftponline/vsm/2002_11...tures/chester/ -- S. Justin Gengo, MCP Web Developer Free code library at: www.aboutfortunate "Out of chaos comes order." Nietzche "Roberto López" <rl****@eurosistemas> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... 我正在做一个asp应用程序,它在我的内联网上的客户端和服务器之间上传和下载文件和文件夹。要做到这一点,我有 Hi, I′m doing an asp application that uploads and downloads files and folders between the client and the server on my intranet. To do this I have 创建线程,它运行正常,但我需要向用户显示 create threads and it runs Ok but I need to show to the user the progress of 进度操作,这就是问题所在。我尝试从线程内部访问Session 变量,以便在自动刷新的页面上显示它,但是,我发现无法访问 the operation and here is the problem. I try to access to the Session Variables from inside the thread to show it on a page that automatically refresh, BUT, I have discovered that there is no access to the

来自新线程内部的httpcontext。还有其他办法吗? 非常感谢。 - RobertoLópez Dpto。 Soporte Software EurosistemasInformáticosyComunicaciones,S.L。

httpcontext from inside the new thread. Is there any other way to do this?? Thanks a lot. -- Roberto López Dpto. Soporte Software Eurosistemas Informáticos y Comunicaciones, S.L.

出现同样的错误。出于某种原因,当新线程从一个类启动时,httpcontext对该线程设置为null。如果是从 aspx页面完成,则没有错误。为什么?我不知道。 S。 Justin Gengo < SJ ***** @ aboutfortunate> escribiónenel mensaje 新闻:#v ************* @ TK2MSFTNGP10.phx.gbl ... The same error appears. For some reason, when the new thread is started from a class, the httpcontext is set to null to the thread. If it is done from a aspx page there is no error. Why? I don′t know. "S. Justin Gengo" <sj*****@aboutfortunate> escribió en el mensaje news:#v*************@TK2MSFTNGP10.phx.gbl... 如何通过会话对象通过公共属性进入类? S. Justin Gengo,MCP Web开发人员 免费代码图书馆: www.aboutfortunate 出于混乱而来的顺序。Nietzche RobertoLópez < RL **** @ eurosistemas>在消息中写道新闻:Ow **************** @ TK2MSFTNGP10.phx.gbl ... How about passing the session object into the class through a public property? -- S. Justin Gengo, MCP Web Developer Free code library at: www.aboutfortunate "Out of chaos comes order." Nietzche "Roberto López" <rl****@eurosistemas> wrote in message news:Ow****************@TK2MSFTNGP10.phx.gbl... 我刚刚读了这篇文章,但是,我需要的是从类中访问会话对象。这样做我alwais收到错误。 S。 Justin Gengo < SJ ***** @ aboutfortunate> escribióenel mensaje 新闻:#m ************** @ TK2MSFTNGP11.phx.gbl ... I just readed this article but, what i need is to access to the session object from within a class. And doing it I alwais receive an error. "S. Justin Gengo" <sj*****@aboutfortunate> escribió en el mensaje news:#m**************@TK2MSFTNGP11.phx.gbl... 这是一篇文章: http:// www .ftponline / vsm / 2002_11 ... tures / chester / - S. Justin Gengo,MCP Web开发人员 免费代码库: www.aboutfortunate 出于混乱而有序。Nietzche RobertoLópez < RL **** @ eurosistemas>在消息中写道新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ... >>我正在做一个上传和下载文件的asp应用程序和>客户端和我的Intranet上的服务器之间的文件夹。要做这个我有>创建线程并运行Ok但是我需要向用户显示 Here''s an article: www.ftponline/vsm/2002_11...tures/chester/ -- S. Justin Gengo, MCP Web Developer Free code library at: www.aboutfortunate "Out of chaos comes order." Nietzche "Roberto López" <rl****@eurosistemas> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... > Hi, > I′m doing an asp application that uploads and downloads files and > folders between the client and the server on my intranet. To do this I have > create threads and it runs Ok but I need to show to the user the

进度

>操作,这是问题所在。我尝试访问 Session>线程内部的变量在自动>的页面上显示它。刷新,但是,我发现无法访问 of > the operation and here is the problem. I try to access to the Session > Variables from inside the thread to show it on a page that automatically > refresh, BUT, I have discovered that there is no access to the

httpcontext

httpcontext

>从新线程内部。还有其他办法吗?> >非常感谢。> > - > RobertoLópez> DPTO。 Soporte软件> EurosistemasInformáticosyComunicaciones,SL > > > from inside the new thread. Is there any other way to do this?? > > Thanks a lot. > > -- > Roberto López > Dpto. Soporte Software > Eurosistemas Informáticos y Comunicaciones, S.L. > >

更多推荐

线程和会话对象

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

发布评论

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

>www.elefans.com

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