473,395 Members | 1,756 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,395 software developers and data experts.

Whats the best way for a thread to update session information?

I'm developing a website which at one point has a hefty amount of data
processing to do. I delegate this to a separate thread and on the results
page do an auto-refresh every few seconds until the results are available.

In my thread I take a reference to the page that invoked the thread, so that
I can get access to the session object. The thread writes to the session to
indicate that it has finished. This all worked fine, until I decided to
switch from InProc to StateServer. Whilst I don't get any errors, it behaves
as though the session object my thread is referencing is different to the
one that my results page is referencing and my communications therefore
don't work any more.

So, my question is, what is the best way for a thread to get access to the
current session object?

(I'm sure it should be sooo easy but ....)

thanks in advance,

Brian.
Nov 21 '05 #1
4 1031
Brian,

I am not sure if I understand you, however if I do.

I don't see the sence of what you are doing, you are creating probably a
bunch of overhead to tell the client that he has to watch what is mostly
done by a WaitCursor.

However your pages are stateless, which means that as soon that you do the
sent, the page is gone out of memory, with all that belongs to him except
the session information, his extra threads are left alone.

Maybe can you do what you want by creating an extra windowservice or
webservice which than can return the information because of a session.id

As I said, be aware that you are creating a bunch of overhead, where your
user has to wait for. A webserver is not a one to one operating process, it
should be able to handle an enormous amount of clients.

I hope this gives some idea's,

Cor
Nov 21 '05 #2
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
Brian,

I am not sure if I understand you, however if I do.

I don't see the sence of what you are doing, you are creating probably a
bunch of overhead to tell the client that he has to watch what is mostly
done by a WaitCursor.

However your pages are stateless, which means that as soon that you do the
sent, the page is gone out of memory, with all that belongs to him except
the session information, his extra threads are left alone.

Maybe can you do what you want by creating an extra windowservice or
webservice which than can return the information because of a session.id

As I said, be aware that you are creating a bunch of overhead, where your
user has to wait for. A webserver is not a one to one operating process,
it should be able to handle an enormous amount of clients.

I hope this gives some idea's,

Cor


I don't mean to appear dense, but how does one implement a WaitCursor for a
web page? I've only seen it used on desktop applications (where session
isn't an issue anyway).

thanks,

Brian.
Nov 21 '05 #3
Brian,

AFAIK is in in most cases (there are exceptions) in ASPNET automatic when
the page is waiting for a postback.

Cor
Nov 21 '05 #4
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...
Brian,

AFAIK is in in most cases (there are exceptions) in ASPNET automatic when
the page is waiting for a postback.

Cor


Never seen it, and I don't want to risk the browser timing out.
Nov 21 '05 #5

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

Similar topics

15
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
0
by: R. Rajesh Jeba Anbiah | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
2
by: Stephen Brown | last post by:
We've been using dotNet for a couple of years now and have been updating our live server by just overwriting (Explorer drag and drop) the aspx and assembly files until we had some errors reported...
5
by: Rudy | last post by:
Hello! I currently have a site online. I added more features to my datagrid page, so users can update and stuff. I though I could just copy the aspx, aspx.vb and the server page including the...
2
by: anassar | last post by:
I have an ASP.Net Web Application where I depended on Sessions to share information across the code. One of the buttons the user clicked, take a long time to process. So, I started...
4
by: Diffident | last post by:
Hi All, I am trying to perform a non-CPU bound operation in an asynchronous fashion using 'Thread' and a delegate. Basically, I am spawning a thread using ThreadStart and Thread. My non-CPU...
6
by: fniles | last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to clients. As I receive data in 1 thread, I put it into an arraylist, and then I remove the data from arraylist and send it...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.