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

Session timeout problem...

Hi, running .net v1.1 framework win2000 iis5.

I've got this random problem that is just driving me crazy and I'm hoping
somebody can help. So here goes:

I have a .net app that has a login page to authenticate users from a sql
database. When the user logs in successfully certain date is then stored in
session variables i.e Username=Session("Username") etc.
My web.config file is configured as followed:
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="datasource=127.0.0.1;Trusted_ Connection=yes"
cookieless="false"
timeout="20"
The IIS server has also a timeout setting of 20mins.
During the login, in code behind I have dynamically created a public shared
datatable that stores values like username,company,IP Address,Time of login
etc. I also created a page where I can view this shared datatable to see who
is currently logged into my system. All of this works fine with no problems.
When the user clicks logout menu option from my app I also have code behind
that will remove the revelvant row from the datatable. Thus giveing me an
accurate datagrid of all my logged in users. This works fine too.
Now the problem bit. If a user simply closes the window or surfs to another
site without logging out of my app, obviously at the 20min mark the users
session will time out. So I also included some code in the global.ascx page
in the session end sub to also remove the relevant row from my datatable, but
for some reason it only works about 60% of the time and I get an 'object not
set to an instance of an object' exception informing me that the session data
has gone.
My immediate thought was that the app was restarting for some reason. But I
ran some test code in the application start sub in global.ascx to log each
time it was restarted and nothing(apart from the first load of course).
I also read some where that the session mode InProc was unreliable, is this
true?
Anyway, I have to use InProc as I want to run code in the session end sub.

Anybody who has any suggestions/Ideas will be a great help as I'm totaly
scratching my head on this one.

Many Thanks
Jul 21 '05 #1
0 1355

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

Similar topics

4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
5
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the...
5
by: Just D. | last post by:
Do we have any access to the Session object from a different Session? The idea is to save Session of a current user and then if he logs in again then return the Session back. It's not a problem to...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
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...
2
by: Rajesh.jain25 | last post by:
Hi, I am facing a problem of automatic session timeout problem and automatic session_end event fired. Case1: As I have analyzed I get to know that the default session timeout is 20 in...
2
by: Tomas Martinez | last post by:
Hi, Well, my problem is so simple as it says in the subjet but very frustrating also. I have a project and it is losing the session variables with each postback, so I downloaded from the web a...
2
by: Orgil | last post by:
I'm using ASP 3.0 however there is ASP.NET, because I'm working an old site that is built in ASP 3.0. I hope you for getting any help for my problem from you. So, my site's sessions are empty...
4
by: thig95 | last post by:
Hi, I've got a web application written in ASP class with VBScript. We have a home grown conctact management system for my company that our users stay active in throughout the day. My problem lies...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.