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

Session data is lost on first entry to application

Hi

I have a problem with certain users of my ASP.NET application. The user logs
into the site, and they are logged into the application. Then when they
select a link, they are presented with a "User session has timed out. Please
log in again" error message. They enter their login details again, and this
time the login works fine.

The session data seems to be getting lost. I've tried reconfiguring the
application to use SQL Server to manage session state, but I'm still getting
exactly the same behaviour. I'm suspecting it must be a problem on the
client, since it only seems to be happening with some users, and when the
user gets the session timeout error message, I don't see any calls to the SQL
Server to check the state before it starts a new one (i.e. its not that the
server is checking for a current session and not finding one).

How do I go about troubleshooting this?

Many thanks
Nov 19 '05 #1
6 1323

Can u share the code that makes the session to expire?
"Paul H" wrote:
Hi

I have a problem with certain users of my ASP.NET application. The user logs
into the site, and they are logged into the application. Then when they
select a link, they are presented with a "User session has timed out. Please
log in again" error message. They enter their login details again, and this
time the login works fine.

The session data seems to be getting lost. I've tried reconfiguring the
application to use SQL Server to manage session state, but I'm still getting
exactly the same behaviour. I'm suspecting it must be a problem on the
client, since it only seems to be happening with some users, and when the
user gets the session timeout error message, I don't see any calls to the SQL
Server to check the state before it starts a new one (i.e. its not that the
server is checking for a current session and not finding one).

How do I go about troubleshooting this?

Many thanks

Nov 19 '05 #2
Hi Baskar

If I knew what piece of code was making my session expire, I would already
have told it not to!

As I was saying, the session cookie seems to be getting lost on the client,
rather than the server.

Paul

"BASKAR BV" wrote:

Can u share the code that makes the session to expire?


Nov 19 '05 #3

This could be a caching problem maybe. Or a browser problem. You are too
vague to diagnose.
Do these users share their browser setting somehow (they are in the same
company) or are they realy independant?

If they are dependant that its probably a browser setting. If not I suspect
chacing cause it introduces a klind of indeterminism in the system.

I can recommend this tool for the browser :

http://www.blunck.info/iehttpheaders.html

Try to get a case that you can reproduce and see whats different in the traffic
between a good and a bad case.
Let me know if you have any more questions and good luck.

Cheers,
Tom Pester
Hi

I have a problem with certain users of my ASP.NET application. The
user logs into the site, and they are logged into the application.
Then when they select a link, they are presented with a "User session
has timed out. Please log in again" error message. They enter their
login details again, and this time the login works fine.

The session data seems to be getting lost. I've tried reconfiguring
the application to use SQL Server to manage session state, but I'm
still getting exactly the same behaviour. I'm suspecting it must be a
problem on the client, since it only seems to be happening with some
users, and when the user gets the session timeout error message, I
don't see any calls to the SQL Server to check the state before it
starts a new one (i.e. its not that the server is checking for a
current session and not finding one).

How do I go about troubleshooting this?

Many thanks

Nov 19 '05 #4
I don't think the browser settings are shared. I'm going to try to get a
closer look at the browser settings and HTTP headers - we've just started a
pilot of the AppSight Black Box software, so I can use that to get some extra
diagnostics.

I'm just curious whether anyone else has experienced something similar. It
seems very odd that the user session gets dropped on the second page they try
to access, and then works fine after that.

Thanks for the help

Paul

"tom pester" wrote:

This could be a caching problem maybe. Or a browser problem. You are too
vague to diagnose.
Do these users share their browser setting somehow (they are in the same
company) or are they realy independant?

If they are dependant that its probably a browser setting. If not I suspect
chacing cause it introduces a klind of indeterminism in the system.

I can recommend this tool for the browser :

http://www.blunck.info/iehttpheaders.html

Try to get a case that you can reproduce and see whats different in the traffic
between a good and a bad case.
Let me know if you have any more questions and good luck.

Cheers,
Tom Pester


Nov 19 '05 #5
WJ

"Paul H" <Pa***@discussions.microsoft.com> wrote in message
news:D4**********************************@microsof t.com...

The session data seems to be getting lost. I've tried reconfiguring the
application to use SQL Server to manage session state, but I'm still
getting
exactly the same behaviour. I'm suspecting it must be a problem on the
client, since it only seems to be happening with some users, and when the
user gets the session timeout error message


Could it be that those client PCs have viruses and they interfere with your
sessions? Because I am using SQL Server for SS and it works fine though slow
but stable. My worst browser something start with "K" hosted on a Fedora, a
Linux distro., even that still works fine. Also check to make sure that
session is not abandoned using code behind somewhere.

Other suggestion is try to capture the SessionID on each page for each user
to make sure that it is the same at the time the server assigned it until
the user breaks off the browser.

John
Nov 19 '05 #6
Yay - solved it!

I got a black box recording of the user's browser session, which helped me
get to the bottom of it - it was a browser problem, rather than a server
fault.

Basically, the user was connecting to the site using an IP address stored in
his Favourites tab (eg http://123.4.5.6/test). He logs in successfully, and
is redirected to a relative URL (eg http://123.4.5.6/test/Worklist.aspx). He
then clicks on a hyperlink, which refers to an absolute URL using a domain
alias (eg http://www.myapp.co.uk/test/Enquiry.aspx). IE looks at the URL,
thinks it's an entirely different website, and drops the session ID it would
otherwise have sent to the server with the request.

I'm glad I finally got to the bottom of this one - I could have spent months
looking for bugs on the server without getting anywhere.

Thanks for the suggestions, people.

Paul

"Paul H" wrote:
I don't think the browser settings are shared. I'm going to try to get a
closer look at the browser settings and HTTP headers - we've just started a
pilot of the AppSight Black Box software, so I can use that to get some extra
diagnostics.

I'm just curious whether anyone else has experienced something similar. It
seems very odd that the user session gets dropped on the second page they try
to access, and then works fine after that.

Thanks for the help

Paul


Nov 19 '05 #7

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

Similar topics

9
by: Patrick | last post by:
Hello I'm running two Webservers Using ASP.NET. both are running the same ASP.NET Application, with <sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42424"...
3
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the...
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.
1
by: Andy | last post by:
Hi Gang I need help. I have an ASP application that in a nutshell allows data entry on a main page. The problem is I'll have users that enter some data and save it. Then they'll enter some...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.