Session Question

Session Question

am 10.01.2008 17:33:35 von Gef.Mongoose

Hi all,

I've been given an old asp.net project to update. The project uses its
own authentication system and small session object to maintain state -
it's running off a mysql server.
One issue with this is session timeout occuring for logged in users.
Currently, session timeout is set at 20.
I need to extend the session timeout of rthose logged in. Would the
following work?
In the session object creation (which means login was a success), if I
place the following code:

HttpContext.Current.Session.Timeout = 7600;

Would this set the session of all logged in users to 12hrs, but keep
unlogged in users to 20 minutes?
if not, any over work arounds to this.

Thanks.

Re: Session Question

am 10.01.2008 17:43:30 von mark

"Paul" wrote in message
news:97fb6d26-18ab-4fd9-83cc-7f33d650775a@1g2000hsl.googlegr oups.com...

> if not, any over work arounds to this.

I must admit I've never tried this, but the following forum post implies
that it's possible, at least with Forms Authentication:
http://forums.asp.net/t/1121681.aspx

Maybe this could be adapted to your requirements...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: Session Question

am 10.01.2008 19:00:10 von George Ter-Saakov

Look at my article
http://www.codeproject.com/KB/aspnet/SessionForever.aspx
It has a nice workaround.

George.

"Paul" wrote in message
news:97fb6d26-18ab-4fd9-83cc-7f33d650775a@1g2000hsl.googlegr oups.com...
> Hi all,
>
> I've been given an old asp.net project to update. The project uses its
> own authentication system and small session object to maintain state -
> it's running off a mysql server.
> One issue with this is session timeout occuring for logged in users.
> Currently, session timeout is set at 20.
> I need to extend the session timeout of rthose logged in. Would the
> following work?
> In the session object creation (which means login was a success), if I
> place the following code:
>
> HttpContext.Current.Session.Timeout = 7600;
>
> Would this set the session of all logged in users to 12hrs, but keep
> unlogged in users to 20 minutes?
> if not, any over work arounds to this.
>
> Thanks.