Skip to main content
Inspiring
February 21, 2007
Question

ASP Sessions timing out in seconds

  • February 21, 2007
  • 1 reply
  • 261 views
ASP and MySQL db.

I have secure pages on numerous sites where users need to log in to gain access to priviledged info, however the pages are kicking users out way too quickly, sometimes within seconds.

I have used a line of code near the top of the pages to prevent this from happening, but it's not made a blind bit of difference. Here's the code at the top of each page:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Session.Timeout=20%>

The session timeout line I got from one of the asp tutorial websites (can't remeber which). What's wrong with the code, and if there is nothing wrong with it, how do I overcome the problem?

Thanks

Mat
This topic has been closed for replies.

1 reply

Inspiring
February 22, 2007
It sounds like you might be on a load-balanced cluster. If this site is on
shared hosting, that's a distinct possibility. If you have dedicated
hosting (i.e., you get your own server) or you operate a server in-house,
then we'll try to figure something else out. But my first guess is that
you're on a cluster and that the server that processes your login isn't
necessarily the same server that serves the next page request. In that
situation, your host will need to install a third-party "sticky sessions"
service. They might have one already; some require you to initialize a
shared session in a certain way. Check your documentation.

"matthew stuart" <webforumsuser@macromedia.com> wrote in message
news:erhtoh$igr$1@forums.macromedia.com...
> ASP and MySQL db.
>
> I have secure pages on numerous sites where users need to log in to gain
> access to priviledged info, however the pages are kicking users out way
> too
> quickly, sometimes within seconds.
>
> I have used a line of code near the top of the pages to prevent this from
> happening, but it's not made a blind bit of difference. Here's the code at
> the
> top of each page:
>
> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <%Session.Timeout=20%>
>
> The session timeout line I got from one of the asp tutorial websites
> (can't
> remeber which). What's wrong with the code, and if there is nothing wrong
> with
> it, how do I overcome the problem?
>
> Thanks
>
> Mat
>