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

asp.net session expiration

it seems that a session in asp.net sometimes expires before its time is
supposed to expire? so for example i developed a client side that relies on a

if Session("Var") > 0 then

else
end if

to verify that a user is logged in with proper credentials. now sometimes
the session expires before the twenty minute mark and kicks the user out of
the client side because the Session("Var") is no longer > 0. can someone tell
me why this is happening?
--
Coding Poet Society

--
Coding Poet Society
Nov 22 '05 #1
2 1530
First off, you should be explicitly casting the session variable to an
integer.You should turn Option Strict On, so that you are reminded of this.

It's hard to say why session would end. Most often it is related to the
ASP.NET process restarting when someone changes web.config, something in the
bin directory, restarts IIS, etc.

"FreeTheCode" <Fr*********@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
it seems that a session in asp.net sometimes expires before its time is
supposed to expire? so for example i developed a client side that relies
on a

if Session("Var") > 0 then

else
end if

to verify that a user is logged in with proper credentials. now sometimes
the session expires before the twenty minute mark and kicks the user out
of
the client side because the Session("Var") is no longer > 0. can someone
tell
me why this is happening?
--
Coding Poet Society

--
Coding Poet Society

Nov 22 '05 #2
the code i posted was just an eg. its not actually what is written. The web
config file nor the /bin dir are changed and therefore did not cause any
restart.
--
Coding Poet Society
"Marina" wrote:
First off, you should be explicitly casting the session variable to an
integer.You should turn Option Strict On, so that you are reminded of this.

It's hard to say why session would end. Most often it is related to the
ASP.NET process restarting when someone changes web.config, something in the
bin directory, restarts IIS, etc.

"FreeTheCode" <Fr*********@discussions.microsoft.com> wrote in message
news:9F**********************************@microsof t.com...
it seems that a session in asp.net sometimes expires before its time is
supposed to expire? so for example i developed a client side that relies
on a

if Session("Var") > 0 then

else
end if

to verify that a user is logged in with proper credentials. now sometimes
the session expires before the twenty minute mark and kicks the user out
of
the client side because the Session("Var") is no longer > 0. can someone
tell
me why this is happening?
--
Coding Poet Society

--
Coding Poet Society


Nov 22 '05 #3

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

Similar topics

2
by: Christophe Lance | last post by:
Hello, I use PHP session cookie to store an id number. I know how to set a cookie expiration date using the setcookie function, but how to set an expiration date when the cookie is created by...
1
by: VB Programmer | last post by:
I know you can make cookies expire, but how about session variables? I'm basically using session for security, etc... One variable is session("LoggedOn"). If a page sits idle for 30 minuts I...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
6
by: spacehopper_man | last post by:
I'm considering ditching all use of Session state in favour of Application state. This is because - from what I can work out - it will be more memory efficient for me. I have three questions:...
17
by: Riaan | last post by:
Hi guys! I have an issue that needs urgent resolution. Imagine this scenario: You have: 1 production server running Windows Server 2003, IIS6 and an instance of MSDE 2000. There is an...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...

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.