473,399 Members | 3,106 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,399 software developers and data experts.

preventing session variables from going null

In ASP classic pages, I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.

I just want to allow one particular session variable to last a long
time. Any other suggestions? \

Thanks.

Dec 18 '06 #1
6 6031

"javelin" <go*************@spamgourmet.comwrote in message
news:11*********************@80g2000cwy.googlegrou ps.com...
In ASP classic pages, I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.

I just want to allow one particular session variable to last a long
time. Any other suggestions? \
Session Variables live as long as the session (unless you explicitly
terminate them before that). If you want a value to persist beyond the life
of a session, then by definition, this can't be done using a session
variable. You will need to use a different mechanism - database/text
file/application variable...

--
Mike Brind
Dec 18 '06 #2
Mike Brind wrote on 18 dec 2006 in
microsoft.public.inetserver.asp.general:
>
"javelin" <go*************@spamgourmet.comwrote in message
news:11*********************@80g2000cwy.googlegrou ps.com...
>In ASP classic pages, I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.

I just want to allow one particular session variable to last a long
time. Any other suggestions? \

Session Variables live as long as the session (unless you explicitly
terminate them before that). If you want a value to persist beyond
the life of a session, then by definition, this can't be done using a
session variable. You will need to use a different mechanism -
database/text file/application variable...
In other words:

Session variables never time out,
they just fade away ...

.... when the session ends.

Preventing the session from ending is all that is required.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Dec 18 '06 #3

"javelin" <go*************@spamgourmet.comwrote in message
news:11*********************@80g2000cwy.googlegrou ps.com...
In ASP classic pages, I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.

I just want to allow one particular session variable to last a long
time. Any other suggestions? \
That's strange. Session variables should survive for at least the period
specified as the session timeout in IIS Manager.

Is this Win2K3 IIS6? If so do you have periodic recycling enabled on the
application pool your ASP app belongs to?

You are aware that if you close your browser you are no longer able to
access the session, right?

>
Thanks.

Dec 19 '06 #4
I'm aware of how session variables work, but can't figure out why the
session timeout settings are being ignored. I can't find anything in
the code (300+ pages worth) that would explain why this particular
variable gets set to "", but there is got that checks if the value is
set to "", and if so, it closes the browser.

I know the server is Windows Server 2003, SP1, if that helps.

Thanks.

Anthony Jones wrote:
"javelin" <go*************@spamgourmet.comwrote in message
news:11*********************@80g2000cwy.googlegrou ps.com...
In ASP classic pages, I want to know if it's possible to prevent
session variables from becoming zero length strings? I have tried
setting the Session.Timeout to a large value, but alwas, after 20
minutes, my session variable times out. I also tried setting the
session timeout in IIS manager to a high value, but this did no good
either.

I just want to allow one particular session variable to last a long
time. Any other suggestions? \

That's strange. Session variables should survive for at least the period
specified as the session timeout in IIS Manager.

Is this Win2K3 IIS6? If so do you have periodic recycling enabled on the
application pool your ASP app belongs to?

You are aware that if you close your browser you are no longer able to
access the session, right?


Thanks.
Dec 19 '06 #5

"javelin" <go*************@spamgourmet.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
I'm aware of how session variables work, but can't figure out why the
session timeout settings are being ignored. I can't find anything in
the code (300+ pages worth) that would explain why this particular
variable gets set to ""
Is it really getting set to "" or is in fact Empty (test using IsEmpty
function)?
'why this particular variable gets set to ""' suggest that you have other
session variables that survive longer, is that so?
Dec 19 '06 #6
Just getting back from vacation here. Well, I don't know why it gets
set to "", to be quite honest. From what I see, there is no code that
actually sets it to "", so I assumed it was happening when the
session.timout expired. I can't think of anything else, but I guess I
can try the IsEmpty function and see what happens.

Thanks.
Anthony Jones wrote:
"javelin" <go*************@spamgourmet.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
I'm aware of how session variables work, but can't figure out why the
session timeout settings are being ignored. I can't find anything in
the code (300+ pages worth) that would explain why this particular
variable gets set to ""

Is it really getting set to "" or is in fact Empty (test using IsEmpty
function)?
'why this particular variable gets set to ""' suggest that you have other
session variables that survive longer, is that so?
Jan 4 '07 #7

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...
9
by: Greg Linwood | last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost embarrassing asking this as I've been using ASP since it was first released & it really shouldn't be this hard to use -...
1
by: Steve Remer | last post by:
My application (relevant code snippets below) originally used Session variables in order to maintain state from page to page. After being unable to solve the mystery of why those variables were...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
4
by: Sarah Marriott | last post by:
Our website contains session variables that are used to validate if a user is logged in etc. We have found that these variables are randomly lost while navigating the website. We set up some...
1
by: Santosh | last post by:
Dear All i am writting a code sending mail with attachement. i am writting code for sending mail in one page and code for attaching a file in the next page. aftet attaching a file i am taking...
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: Larry R | last post by:
I have a wizard control that has a varying number of steps. Each step utilizes different custom business objects and populates values. The steps are partially determined at the beginning of the...
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.