473,320 Members | 2,202 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,320 software developers and data experts.

How to use HttpSessionState with SqlState

Is it possible to use the Session object, with SqlState, when outside
of a request scope?

I have some very slow queries that I fire asynchronously, while the
user sees a wait page. Therefore, when my results are ready, I don't
have HttpContext.Current. Even though I can save a reference to the
current Session object, I'm not sure I can rely on it, since I have
SqlState configured (actually I'm still developing with InProc).

Any help with this will be greatly appreciated.

Thanks.

Nov 19 '05 #1
2 1311
not really. with non inproc state servers the following happens

BeginRequest

deserialize Session Store to new Session Object

request processing

serialize Session object to Session Store
End Request

this means if you hold a reference to a Session object in a background
thread you can read it, but updates won't be refected in the store. with the
inproc, no serialization happens, a reference is passed around, so its
always the same object.

you should create a background request queues, with a pool of request
threads. use an input and output queue.

then your page processing looks like:

client request
queue up long request request
store reqid in session
return to client

client poll
if reqid not done return to client
else
remove response for reqid from queue
process response
return to client

-- bruce (sqlwork.com)





"forinti" <fo*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Is it possible to use the Session object, with SqlState, when outside
of a request scope?

I have some very slow queries that I fire asynchronously, while the
user sees a wait page. Therefore, when my results are ready, I don't
have HttpContext.Current. Even though I can save a reference to the
current Session object, I'm not sure I can rely on it, since I have
SqlState configured (actually I'm still developing with InProc).

Any help with this will be greatly appreciated.

Thanks.

Nov 19 '05 #2
This was very helpful, thank you very much!

There is just one extra complicating factor: I'll have a web farm in
production.
So I suppose I'll have to have this queue in the database.

Nov 19 '05 #3

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

Similar topics

1
by: Steve | last post by:
Is there a property or method that I can check to see if a HttpSessionState has already timed out or not? I know that the HttpSessionState.Timeout property gives you the length of the session...
1
by: Scott | last post by:
I have a few questions about calling HttpSessionState.Abandon: 1) Does the session immediately go away or does it hang around and go away based on the session timeout rules? 2) What happens to...
5
by: Mike | last post by:
I have the need to keep a substantial amount of session state, but I do not have the option of using the HttpSessionState object. My current scheme for dealing with this is to convert all the...
2
by: Nathan Sokalski | last post by:
I have a page that determines some of what to display based on HttpSessionState. When I go to it the first time, it displays everything the way I would expect. Then I go to another page on my site...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.