Session data is lost on first entry to application

G

Guest

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
 
G

Guest

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
 
T

tom pester

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
 
G

Guest

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
 
W

WJ

Paul H said:
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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top