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

Can I reconnect to a session that has timed out or been abandoned

We have a problem where the session is getting abandoned for no
apparent reason. It's not timing out. We save some important data in
the Session object. The user will click on something, causing a
postback, and there will be nothing in the Session object. The session
is getting restarted with the same session ID. Since we haven't been
able to stop this from happening, we would like to just reconnect the
user to their old session data. We've been storing it in process, but
will probably have to switch to out of process (e.g. SQL Server), so
that it can persist. So this is what would happen: If a postback
occurs and there is no data in the Session cache, we'd just try to
reconnect to the old Session cache using the same Session ID. Is this
possible?

thanks in advance,
John

Mar 10 '07 #1
9 2306
On Mar 10, 12:01 pm, "Big Daddy" <johngil...@yahoo.comwrote:
We have a problem where the session is getting abandoned for no
apparent reason. It's not timing out. We save some important data in
the Session object. The user will click on something, causing a
postback, and there will be nothing in the Session object. The session
is getting restarted with the same session ID. Since we haven't been
able to stop this from happening, we would like to just reconnect the
user to their old session data. We've been storing it in process, but
will probably have to switch to out of process (e.g. SQL Server), so
that it can persist. So this is what would happen: If a postback
occurs and there is no data in the Session cache, we'd just try to
reconnect to the old Session cache using the same Session ID. Is this
possible?
First of all, check if it could be the reason of your problem
http://support.microsoft.com/kb/316148/

If it's not the case, I would suggest to use the database to save the
session data

Mar 10 '07 #2
Big Daddy wrote:
We have a problem where the session is getting abandoned for no
apparent reason. It's not timing out. We save some important data in
the Session object. The user will click on something, causing a
postback, and there will be nothing in the Session object. The session
is getting restarted with the same session ID. Since we haven't been
able to stop this from happening, we would like to just reconnect the
user to their old session data. We've been storing it in process, but
will probably have to switch to out of process (e.g. SQL Server), so
that it can persist. So this is what would happen: If a postback
occurs and there is no data in the Session cache, we'd just try to
reconnect to the old Session cache using the same Session ID. Is this
possible?

thanks in advance,
John
A new session never gets the same session id as the previous one. If you
have the same session id, you have the same Session object. This
suggests that there actually is something in your code that removes the
session variables.

--
Göran Andersson
_____
http://www.guffa.com
Mar 10 '07 #3
On Mar 10, 4:43 pm, Göran Andersson <g...@guffa.comwrote:
A new session never gets the same session id as the previous one. If you
have the same session id, you have the same Session object. This
suggests that there actually is something in your code that removes the
session variables.
Göran:

Q: Why does the SessionID remain the same after the Session times out
or abandoned?
A: Even though the session state expires after the indicated timeout
period, the session ID lasts as long as the browser session. What this
implies is that the same session ID can represent multiple sessions
over time where the instance of the browser remain the same.

http://www.eggheadcafe.com/articles/20021016.asp

Mar 10 '07 #4
"Göran Andersson" <gu***@guffa.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
A new session never gets the same session id as the previous one.
This is simply untrue: http://support.microsoft.com/?kbid=899918

Specifically: "When you abandon a session, the session ID cookie is not
removed from the browser of the user. Therefore, as soon as the session has
been abandoned, any new requests to the same application will use the same
session ID but will have a new session state instance."
Mar 10 '07 #5
On Mar 10, 3:29 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
>
First of all, check if it could be the reason of your problemhttp://support.microsoft.com/kb/316148/

If it's not the case, I would suggest to use the database to save the
session data
I don't think the problem that the session is getting restarted is
because of antivirus software, as suggested by the article. We have
already looked into that.

As for your suggestion of using the database, do you mean coming up
with our own home-designed solution that is like a session cache, or
do you mean using the session where the mode is SQLServer and ASP.NET
automatically saves the session cache in the database? If you mean the
latter, that would be fine with me...I just don't know how to
reconnect to the session data after the session has been restarted.

thanks again,
John

Mar 10 '07 #6
On Mar 10, 6:22 pm, "Big Daddy" <johngil...@yahoo.comwrote:
>
As for your suggestion of using the database, do you mean coming up
with our own home-designed solution that is like a session cache
Yes.
If you mean the
latter, that would be fine with me...I just don't know how to
reconnect to the session data after the session has been restarted.
I don't think this would be possible.

In any case, I think it is better to find why the session is getting
abandoned.

Mar 10 '07 #7
Alexey Smirnov wrote:
On Mar 10, 4:43 pm, Göran Andersson <g...@guffa.comwrote:
>A new session never gets the same session id as the previous one. If you
have the same session id, you have the same Session object. This
suggests that there actually is something in your code that removes the
session variables.

Göran:

Q: Why does the SessionID remain the same after the Session times out
or abandoned?
A: Even though the session state expires after the indicated timeout
period, the session ID lasts as long as the browser session. What this
implies is that the same session ID can represent multiple sessions
over time where the instance of the browser remain the same.

http://www.eggheadcafe.com/articles/20021016.asp
I see. I thought that would clearly be a security risk, but perhaps it
isn't.

--
Göran Andersson
_____
http://www.guffa.com
Mar 10 '07 #8
Mark Rae wrote:
"Göran Andersson" <gu***@guffa.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>A new session never gets the same session id as the previous one.

This is simply untrue: http://support.microsoft.com/?kbid=899918

Specifically: "When you abandon a session, the session ID cookie is not
removed from the browser of the user. Therefore, as soon as the session has
been abandoned, any new requests to the same application will use the same
session ID but will have a new session state instance."
I see. I thought that would clearly be a security risk, but perhaps it
isn't.
--
Göran Andersson
_____
http://www.guffa.com
Mar 10 '07 #9
"Göran Andersson" <gu***@guffa.comwrote in message
news:e2*************@TK2MSFTNGP06.phx.gbl...
>>A new session never gets the same session id as the previous one.

This is simply untrue: http://support.microsoft.com/?kbid=899918

Specifically: "When you abandon a session, the session ID cookie is not
removed from the browser of the user. Therefore, as soon as the session
has been abandoned, any new requests to the same application will use the
same session ID but will have a new session state instance."

I see. I thought that would clearly be a security risk, but perhaps it
isn't.
I couldn't agree more!!! There are some, er, features of the Framework which
are unfathomable (to me, at least...) and this is one of them... :-)
Mar 12 '07 #10

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

Similar topics

2
by: Andy | last post by:
Hi Gang Is there any way with ASP that I can tell if a user session has timed out? The problem is that we have a database app where a user session may time out. After this happens the user...
5
by: Yossi | last post by:
I want to set the asp session id path property. how can I do that? I mean, asp session id is stored in a cookie and like any other cookie it should have properties (or attributes), how can I...
5
by: David Laub | last post by:
Is it possible to know when an asp.net session has timed out? Is there some sort of timer event? Thanks
3
by: Jamie | last post by:
Hello, We are opening Web Forms via a workflow system that our company has purchased from an outside vendor. Our problem is when opening multiple pages from the workflow system for the same Web...
3
by: Germán | last post by:
I was experiencing problems with session in asp .net. I´ve set up session timeout on 180 minutes at web.config, machine.config, iis and even in application code, always session expires on 20...
0
by: js | last post by:
In my project I have both ASPX and classic ASP. Four things in question are the entry page(Main.aspx), the logon page(logon.ASP), .Net Session, legacy ASP Session. The Main.apsx contains a Logon...
1
by: Kevin Jackson | last post by:
Hello, Using any of the ASP.NET session storage techniques, is there a method in one of the HTTP objects that you can get the list of active (not abandoned or timed out) session keys (and maybe...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
3
by: joes.mailing.lists | last post by:
Hi, I'm working a web application using comet (Orbited) for real-time status updates and messaging. The messaging system works great, but I've noticed that if I disconnect my laptop internet...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
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...

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.