473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

threads an session variables

hello,
In my web app when some button is clicked, a new thread is created to
import data and that thread creates some threads too, inside those threads
some session variables are updated, but another aspx page can´t see the
updates, this happends only if i set the sessionstate mode to stateserver,
with inproc mode all works fine, i use session variables in other aspx pages
and all works fine(but don´t use threads to read/update session variables).

Any sugestions?
Jul 17 '06 #1
3 1810
Panic,
This sounds terribly complicated to me. Have you tried to see if the
HttpContext.Current is available to these background threads?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"panic" wrote:
hello,
In my web app when some button is clicked, a new thread is created to
import data and that thread creates some threads too, inside those threads
some session variables are updated, but another aspx page can´t see the
updates, this happends only if i set the sessionstate mode to stateserver,
with inproc mode all works fine, i use session variables in other aspx pages
and all works fine(but don´t use threads to read/update session variables).

Any sugestions?
Jul 17 '06 #2
No, the HttpContext is not availabe for that threads, the weird thing here
it is that all works fine setting mode=inproc for sessionstate. in web
config.

"Peter Bromberg [C# MVP]" wrote:
Panic,
This sounds terribly complicated to me. Have you tried to see if the
HttpContext.Current is available to these background threads?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"panic" wrote:
hello,
In my web app when some button is clicked, a new thread is created to
import data and that thread creates some threads too, inside those threads
some session variables are updated, but another aspx page can´t see the
updates, this happends only if i set the sessionstate mode to stateserver,
with inproc mode all works fine, i use session variables in other aspx pages
and all works fine(but don´t use threads to read/update session variables).

Any sugestions?
Jul 17 '06 #3
To make it work, for now i change the session variables for application
variables and it works i made this just because both pages are available just
for one user, i don´t recomend this for other situations...i´ll keep looking
for a solution with session variables.


"Peter Bromberg [C# MVP]" wrote:
Panic,
This sounds terribly complicated to me. Have you tried to see if the
HttpContext.Current is available to these background threads?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"panic" wrote:
hello,
In my web app when some button is clicked, a new thread is created to
import data and that thread creates some threads too, inside those threads
some session variables are updated, but another aspx page can´t see the
updates, this happends only if i set the sessionstate mode to stateserver,
with inproc mode all works fine, i use session variables in other aspx pages
and all works fine(but don´t use threads to read/update session variables).

Any sugestions?
Jul 17 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
8
by: Angel | last post by:
Hi everybody, I am new to ASP.NET, and my question might be obvious to most of you but I do not seem to find many things about threads and ASP.NET. I have an object(Object 1) which need some...
2
by: Oenone | last post by:
I'm upgrading a DLL from VB6 to VB.NET. The DLL gets called from an ASP.NET web application. In the VB6 code there is a module-level object which stores the context about what the user is doing...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
7
by: Mark B | last post by:
Hi I was wondering if someone could help me with the syntax for some VB.Net ASPX code to: - Start 20 threads - End all threads after the sooner of 10 seconds or if all of the threads...
3
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
6
by: Gary Lee | last post by:
In VB.NET using CDO, I'd like to allow multiple threads to share a single MAPI.Session object. If I declare and instantiate sessions within each thread, I'm OK (although this negates the...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.