Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Will sessionID be empty if a session expired

0 views
Skip to first unread message

c676228

unread,
Jan 22, 2007, 6:51:18 PM1/22/07
to
Hi all
I have a question for an ASP page. Usually I have some sort of session
variables
in my asp program and I use them to check if I need to display "your session
is expired and please start over( a link page people can start overagain if
the session is idled for more than 20 minutes in the middle of transactions.)

If I don't set up any session variable but trying to use SessionID to check,
it is OK, will sessionID become empty if the session is expired? Do you have
a better way?
Do you know what other program usually do?
Thank you.
--
Betty

Steven Cheng[MSFT]

unread,
Jan 22, 2007, 11:03:59 PM1/22/07
to
Hi Betty,

For SessionID in classic ASP, I think the ASP engine will make sure whether
the session from the current request is valid or expired(depend on the
cookie value). Then, if the original session has been expired, it will
start a new session, set a new session cookie. However, unlike ASP.NET,
classic ASP doesn't provide a property like IsNewSession so that you can
not simply detect whether a session is a new session. Yes, you can rely on
sessionID, but you need to always keep the last/old sessionID so that you
can compare. I don't think this is quite convenient to do in ASP. So IMO,
I would prefer storing a flag data in session for detect whether session
has been expired. In each page request, you can check that flag item(e.g.
Session("flag")). If that value doesn't exist, that means session state has
been expired. How do you think?

BTW, in ASP.NET the sessionID is abit more different. If you do not store
anything in Session, the ASP.NET runtime won't make your sessionID
fixed(will change on each request).

Please feel free to let me know if you have any questions or other ideas on
this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

c676228

unread,
Jan 23, 2007, 12:01:01 PM1/23/07
to
Thank you, Steven, I got it. Just like you said, in each page request, check
the session flag data will be much easier.
--
Betty

Steven Cheng[MSFT]

unread,
Jan 23, 2007, 8:02:32 PM1/23/07
to
You're welcome :)

Evertjan.

unread,
Jan 24, 2007, 3:13:26 AM1/24/07
to
Steven Cheng[MSFT] wrote on 24 jan 2007 in
microsoft.public.inetserver.asp.general:

> You're welcome :)

Welcome on what?
Who is "you"?

Please always quote on usenet, this is NOT email.

> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Dave Anderson

unread,
Jan 25, 2007, 2:23:46 PM1/25/07
to
Evertjan. wrote:
>> You're welcome :)
>
> Welcome on what?
> Who is "you"?
>
> Please always quote on usenet, this is NOT email.

Perhaps it's time for you to upgrade from RN to TRN, Evertjan.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.


Evertjan.

unread,
Jan 25, 2007, 2:44:34 PM1/25/07
to
Dave Anderson wrote on 25 jan 2007 in
microsoft.public.inetserver.asp.general:

> Evertjan. wrote:
>>> You're welcome :)
>>
>> Welcome on what?
>> Who is "you"?
>>
>> Please always quote on usenet, this is NOT email.
>
> Perhaps it's time for you to upgrade from RN to TRN, Evertjan.

1 I have no idea what those letters mean, Dave, perhaps news readers?

2 Since the netiquette adagium "always quote" is ment to remedy the
impossibility to be certain that the whole thread is yet and stays long
enough on all news servers, the advice of upgrading is not a good advice
for not following netiquette.

Dave Anderson

unread,
Jan 25, 2007, 3:35:33 PM1/25/07
to
Evertjan. wrote:
>> Perhaps it's time for you to upgrade from RN to TRN, Evertjan.
>
> 1 I have no idea what those letters mean, Dave, perhaps news readers?
>
> 2 Since the netiquette adagium "always quote" is ment to remedy the
> impossibility to be certain that the whole thread is yet and stays
> long enough on all news servers, the advice of upgrading is not a
> good advice for not following netiquette.

It was a joke, Evertjan. [trn] was an improvement on [rn], namely that it
added threading to a newsreader for the first time (circa 1989).

Evertjan.

unread,
Jan 25, 2007, 3:59:37 PM1/25/07
to
Dave Anderson wrote on 25 jan 2007 in
microsoft.public.inetserver.asp.general:

> Evertjan. wrote:


>>> Perhaps it's time for you to upgrade from RN to TRN, Evertjan.
>>
>> 1 I have no idea what those letters mean, Dave, perhaps news readers?
>>
>> 2 Since the netiquette adagium "always quote" is ment to remedy the
>> impossibility to be certain that the whole thread is yet and stays
>> long enough on all news servers, the advice of upgrading is not a
>> good advice for not following netiquette.
>
> It was a joke, Evertjan. [trn] was an improvement on [rn], namely that
> it added threading to a newsreader for the first time (circa 1989).

I thought the Royal Navy did not need an improvement.

My days of unix usenet are far behind, since 1996, I think, Dave,
and wasn't I using Tin then?

0 new messages