By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

Strange session timeout problem(urgent help needed).

P: n/a

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 running continuously and refreshing once
an hour.
I there set timeout= 61 in <sessionState section and on my page it says
<meta http-equiv="refresh" content="3600">.
I also set timeout=120 in the <forms section of web.config to make sure
the cookie does not expire before the session has been renewed.

But anyway i'm getting the temeout every 3600 seconds.
Can someone explain this?

Many thanks in advance.

JB

Nov 19 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
Actually, it makes a lot of sense that, if you have
timeout= 61 in <sessionState, that the sessions
would expire in approximately 3600 seconds.

Remember that the timeout value is expressed in minutes.

If you need a higher expiration time for your sessions,
set timeout= in <sessionState to 120, if that's what you need.

If you do, the sessions will expire in 7200 seconds.

Take note that the larger the session expiration time,
the more memory consumption and that, at some point,
you might wind up with a recycled application due to
lack of sufficient RAM, and all your sessions will expire anyway.

You will have to experiment and look for a trade-off between
configured session expiration time and application recycling time.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...

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 running continuously and refreshing
once an hour.
I there set timeout= 61 in <sessionState section and on my page it
says
<meta http-equiv="refresh" content="3600">.
I also set timeout=120 in the <forms section of web.config to make sure
the cookie does not expire before the session has been renewed.

But anyway i'm getting the temeout every 3600 seconds.
Can someone explain this?

Many thanks in advance.

JB


Nov 19 '05 #2

P: n/a
But then how do i avoid my session to timeout still keeping the refresh
time to 1 hour (3600 seconds)?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Actually, it makes a lot of sense that, if you have
timeout= 61 in <sessionState, that the sessions
would expire in approximately 3600 seconds.

Remember that the timeout value is expressed in minutes.

If you need a higher expiration time for your sessions,
set timeout= in <sessionState to 120, if that's what you need.

If you do, the sessions will expire in 7200 seconds.

Take note that the larger the session expiration time,
the more memory consumption and that, at some point,
you might wind up with a recycled application due to
lack of sufficient RAM, and all your sessions will expire anyway.

You will have to experiment and look for a trade-off between
configured session expiration time and application recycling time.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...

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 running continuously and refreshing
once an hour.
I there set timeout= 61 in <sessionState section and on my page it
says
<meta http-equiv="refresh" content="3600">.
I also set timeout=120 in the <forms section of web.config to make sure
the cookie does not expire before the session has been renewed.

But anyway i'm getting the temeout every 3600 seconds.
Can someone explain this?

Many thanks in advance.

JB



Nov 19 '05 #3

P: n/a
The refresh time is immaterial.

If you have your session timeout set to 20 minutes,
and have a meta refresh, in all your pages, set to 19 minutes,
you could have your sessions continually refreshed, without the
need to accumulate RAM resources over 120 minutes.

As long as a user has a page at your site open, the sessions
would be automatically extended for another 20 minutes.

If they close all pages at your site, i.e., if they go away
permanently, then the sessions would expire 20 minutes
after the last page open was refreshed.

There's really no need to have large session timeout values.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
But then how do i avoid my session to timeout still keeping the refresh
time to 1 hour (3600 seconds)?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Actually, it makes a lot of sense that, if you have
timeout= 61 in <sessionState, that the sessions
would expire in approximately 3600 seconds.

Remember that the timeout value is expressed in minutes.

If you need a higher expiration time for your sessions,
set timeout= in <sessionState to 120, if that's what you need.

If you do, the sessions will expire in 7200 seconds.

Take note that the larger the session expiration time,
the more memory consumption and that, at some point,
you might wind up with a recycled application due to
lack of sufficient RAM, and all your sessions will expire anyway.

You will have to experiment and look for a trade-off between
configured session expiration time and application recycling time.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...

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 running continuously and refreshing
once an hour.
I there set timeout= 61 in <sessionState section and on my page it
says
<meta http-equiv="refresh" content="3600">.
I also set timeout=120 in the <forms section of web.config to make sure
the cookie does not expire before the session has been renewed.

But anyway i'm getting the temeout every 3600 seconds.
Can someone explain this?

Many thanks in advance.

JB




Nov 19 '05 #4

P: n/a
in my case i want to do a refresh every hour (<meta http-equiv="refresh"
content="3600">).so i set timeout=61. But this fails unexpectedely.
Why?

can i have session tiemout=20 when
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
The refresh time is immaterial.

If you have your session timeout set to 20 minutes,
and have a meta refresh, in all your pages, set to 19 minutes,
you could have your sessions continually refreshed, without the
need to accumulate RAM resources over 120 minutes.

As long as a user has a page at your site open, the sessions
would be automatically extended for another 20 minutes.

If they close all pages at your site, i.e., if they go away
permanently, then the sessions would expire 20 minutes
after the last page open was refreshed.

There's really no need to have large session timeout values.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
But then how do i avoid my session to timeout still keeping the refresh
time to 1 hour (3600 seconds)?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Actually, it makes a lot of sense that, if you have
timeout= 61 in <sessionState, that the sessions
would expire in approximately 3600 seconds.

Remember that the timeout value is expressed in minutes.

If you need a higher expiration time for your sessions,
set timeout= in <sessionState to 120, if that's what you need.

If you do, the sessions will expire in 7200 seconds.

Take note that the larger the session expiration time,
the more memory consumption and that, at some point,
you might wind up with a recycled application due to
lack of sufficient RAM, and all your sessions will expire anyway.

You will have to experiment and look for a trade-off between
configured session expiration time and application recycling time.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...

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 running continuously and refreshing
once an hour.
I there set timeout= 61 in <sessionState section and on my page it
says
<meta http-equiv="refresh" content="3600">.
I also set timeout=120 in the <forms section of web.config to make sure
the cookie does not expire before the session has been renewed.

But anyway i'm getting the temeout every 3600 seconds.
Can someone explain this?

Many thanks in advance.

JB




Nov 19 '05 #5

P: n/a
Are you using out-of-process session state managemenet ?
( State Server or SQL Server ? )

If you are, Session_OnEnd might not get called.

Session_OnEnd only gets called if using InProc
( in-process ) session state management.

With SQL Server, there's a way to clean up
the expired sessions by running a SQL job.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
in my case i want to do a refresh every hour (<meta http-equiv="refresh"
content="3600">).so i set timeout=61. But this fails unexpectedely.
Why?

can i have session tiemout=20 when
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
The refresh time is immaterial.

If you have your session timeout set to 20 minutes,
and have a meta refresh, in all your pages, set to 19 minutes,
you could have your sessions continually refreshed, without the
need to accumulate RAM resources over 120 minutes.

As long as a user has a page at your site open, the sessions
would be automatically extended for another 20 minutes.

If they close all pages at your site, i.e., if they go away
permanently, then the sessions would expire 20 minutes
after the last page open was refreshed.

There's really no need to have large session timeout values.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
But then how do i avoid my session to timeout still keeping the refresh
time to 1 hour (3600 seconds)?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Actually, it makes a lot of sense that, if you have
timeout= 61 in <sessionState, that the sessions
would expire in approximately 3600 seconds.

Remember that the timeout value is expressed in minutes.

If you need a higher expiration time for your sessions,
set timeout= in <sessionState to 120, if that's what you need.

If you do, the sessions will expire in 7200 seconds.

Take note that the larger the session expiration time,
the more memory consumption and that, at some point,
you might wind up with a recycled application due to
lack of sufficient RAM, and all your sessions will expire anyway.

You will have to experiment and look for a trade-off between
configured session expiration time and application recycling time.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...
>
> 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 running continuously and refreshing
> once an hour.
> I there set timeout= 61 in <sessionState section and on my page it
> says
> <meta http-equiv="refresh" content="3600">.
> I also set timeout=120 in the <forms section of web.config to make
> sure
> the cookie does not expire before the session has been renewed.
>
> But anyway i'm getting the temeout every 3600 seconds.
> Can someone explain this?
>
> Many thanks in advance.
>
> JB
>
>
>
>
>



Nov 19 '05 #6

P: n/a
No i'm not using out of process session.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Are you using out-of-process session state managemenet ?
( State Server or SQL Server ? )

If you are, Session_OnEnd might not get called.

Session_OnEnd only gets called if using InProc
( in-process ) session state management.

With SQL Server, there's a way to clean up
the expired sessions by running a SQL job.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
in my case i want to do a refresh every hour (<meta http-equiv="refresh"
content="3600">).so i set timeout=61. But this fails unexpectedely.
Why?

can i have session tiemout=20 when
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
The refresh time is immaterial.

If you have your session timeout set to 20 minutes,
and have a meta refresh, in all your pages, set to 19 minutes,
you could have your sessions continually refreshed, without the
need to accumulate RAM resources over 120 minutes.

As long as a user has a page at your site open, the sessions
would be automatically extended for another 20 minutes.

If they close all pages at your site, i.e., if they go away
permanently, then the sessions would expire 20 minutes
after the last page open was refreshed.

There's really no need to have large session timeout values.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
But then how do i avoid my session to timeout still keeping the refresh
time to 1 hour (3600 seconds)?

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> Actually, it makes a lot of sense that, if you have
> timeout= 61 in <sessionState, that the sessions
> would expire in approximately 3600 seconds.
>
> Remember that the timeout value is expressed in minutes.
>
> If you need a higher expiration time for your sessions,
> set timeout= in <sessionState to 120, if that's what you need.
>
> If you do, the sessions will expire in 7200 seconds.
>
> Take note that the larger the session expiration time,
> the more memory consumption and that, at some point,
> you might wind up with a recycled application due to
> lack of sufficient RAM, and all your sessions will expire anyway.
>
> You will have to experiment and look for a trade-off between
> configured session expiration time and application recycling time.
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaņol
> Ven, y hablemos de ASP.NET...
> ======================
>
> "jensen bredal" <je***********@yahoo.dk> wrote in message
> news:uT**************@TK2MSFTNGP09.phx.gbl...
>>
>> 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 running continuously and
>> refreshing once an hour.
>> I there set timeout= 61 in <sessionState section and on my page
>> it says
>> <meta http-equiv="refresh" content="3600">.
>> I also set timeout=120 in the <forms section of web.config to make
>> sure
>> the cookie does not expire before the session has been renewed.
>>
>> But anyway i'm getting the temeout every 3600 seconds.
>> Can someone explain this?
>>
>> Many thanks in advance.
>>
>> JB
>>
>>
>>
>>
>>
>
>



Nov 19 '05 #7

P: n/a
I'd suggest you test with smaller values,
so that you can run a number of tests
to check whether it runs OK or not.

Try setting timeout to 1 and refresh to 2.
That will allow you to test faster.

Then, depending on the results, you can increment.

If I recall correctly, the maximum session
timeout value is 1440 minutes, or 24 hours.

Anything higher than that will throw an error.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
No i'm not using out of process session.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Are you using out-of-process session state managemenet ?
( State Server or SQL Server ? )

If you are, Session_OnEnd might not get called.

Session_OnEnd only gets called if using InProc
( in-process ) session state management.

With SQL Server, there's a way to clean up
the expired sessions by running a SQL job.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
in my case i want to do a refresh every hour (<meta http-equiv="refresh"
content="3600">).so i set timeout=61. But this fails unexpectedely.
Why?

can i have session tiemout=20 when
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
The refresh time is immaterial.

If you have your session timeout set to 20 minutes,
and have a meta refresh, in all your pages, set to 19 minutes,
you could have your sessions continually refreshed, without the
need to accumulate RAM resources over 120 minutes.

As long as a user has a page at your site open, the sessions
would be automatically extended for another 20 minutes.

If they close all pages at your site, i.e., if they go away
permanently, then the sessions would expire 20 minutes
after the last page open was refreshed.

There's really no need to have large session timeout values.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
> But then how do i avoid my session to timeout still keeping the
> refresh
> time to 1 hour (3600 seconds)?
>
>
>
> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
>> Actually, it makes a lot of sense that, if you have
>> timeout= 61 in <sessionState, that the sessions
>> would expire in approximately 3600 seconds.
>>
>> Remember that the timeout value is expressed in minutes.
>>
>> If you need a higher expiration time for your sessions,
>> set timeout= in <sessionState to 120, if that's what you need.
>>
>> If you do, the sessions will expire in 7200 seconds.
>>
>> Take note that the larger the session expiration time,
>> the more memory consumption and that, at some point,
>> you might wind up with a recycled application due to
>> lack of sufficient RAM, and all your sessions will expire anyway.
>>
>> You will have to experiment and look for a trade-off between
>> configured session expiration time and application recycling time.
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espaņol
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "jensen bredal" <je***********@yahoo.dk> wrote in message
>> news:uT**************@TK2MSFTNGP09.phx.gbl...
>>>
>>> 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 running continuously and
>>> refreshing once an hour.
>>> I there set timeout= 61 in <sessionState section and on my page
>>> it says
>>> <meta http-equiv="refresh" content="3600">.
>>> I also set timeout=120 in the <forms section of web.config to make
>>> sure
>>> the cookie does not expire before the session has been renewed.
>>>
>>> But anyway i'm getting the temeout every 3600 seconds.
>>> Can someone explain this?
>>>
>>> Many thanks in advance.
>>>
>>> JB
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>



Nov 19 '05 #8

P: n/a
Strangely there is no problem with small values up to about 30 minutes!

i tried 1 , 2 , 15 .....30. No timeout or what so ever.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OU**************@TK2MSFTNGP14.phx.gbl...
I'd suggest you test with smaller values,
so that you can run a number of tests
to check whether it runs OK or not.

Try setting timeout to 1 and refresh to 2.
That will allow you to test faster.

Then, depending on the results, you can increment.

If I recall correctly, the maximum session
timeout value is 1440 minutes, or 24 hours.

Anything higher than that will throw an error.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
No i'm not using out of process session.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Are you using out-of-process session state managemenet ?
( State Server or SQL Server ? )

If you are, Session_OnEnd might not get called.

Session_OnEnd only gets called if using InProc
( in-process ) session state management.

With SQL Server, there's a way to clean up
the expired sessions by running a SQL job.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
in my case i want to do a refresh every hour (<meta
http-equiv="refresh" content="3600">).so i set timeout=61. But this
fails unexpectedely.
Why?

can i have session tiemout=20 when
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
> The refresh time is immaterial.
>
> If you have your session timeout set to 20 minutes,
> and have a meta refresh, in all your pages, set to 19 minutes,
> you could have your sessions continually refreshed, without the
> need to accumulate RAM resources over 120 minutes.
>
> As long as a user has a page at your site open, the sessions
> would be automatically extended for another 20 minutes.
>
> If they close all pages at your site, i.e., if they go away
> permanently, then the sessions would expire 20 minutes
> after the last page open was refreshed.
>
> There's really no need to have large session timeout values.
>
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaņol
> Ven, y hablemos de ASP.NET...
> ======================
>
> "jensen bredal" <je***********@yahoo.dk> wrote in message
> news:e%****************@TK2MSFTNGP15.phx.gbl...
>> But then how do i avoid my session to timeout still keeping the
>> refresh
>> time to 1 hour (3600 seconds)?
>>
>>
>>
>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
>> news:%2****************@TK2MSFTNGP09.phx.gbl...
>>> Actually, it makes a lot of sense that, if you have
>>> timeout= 61 in <sessionState, that the sessions
>>> would expire in approximately 3600 seconds.
>>>
>>> Remember that the timeout value is expressed in minutes.
>>>
>>> If you need a higher expiration time for your sessions,
>>> set timeout= in <sessionState to 120, if that's what you need.
>>>
>>> If you do, the sessions will expire in 7200 seconds.
>>>
>>> Take note that the larger the session expiration time,
>>> the more memory consumption and that, at some point,
>>> you might wind up with a recycled application due to
>>> lack of sufficient RAM, and all your sessions will expire anyway.
>>>
>>> You will have to experiment and look for a trade-off between
>>> configured session expiration time and application recycling time.
>>>
>>>
>>>
>>> Juan T. Llibre
>>> ASP.NET MVP
>>> http://asp.net.do/foros/
>>> Foros de ASP.NET en Espaņol
>>> Ven, y hablemos de ASP.NET...
>>> ======================
>>>
>>> "jensen bredal" <je***********@yahoo.dk> wrote in message
>>> news:uT**************@TK2MSFTNGP09.phx.gbl...
>>>>
>>>> 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 running continuously and
>>>> refreshing once an hour.
>>>> I there set timeout= 61 in <sessionState section and on my page
>>>> it says
>>>> <meta http-equiv="refresh" content="3600">.
>>>> I also set timeout=120 in the <forms section of web.config to make
>>>> sure
>>>> the cookie does not expire before the session has been renewed.
>>>>
>>>> But anyway i'm getting the temeout every 3600 seconds.
>>>> Can someone explain this?
>>>>
>>>> Many thanks in advance.
>>>>
>>>> JB
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 19 '05 #9

P: n/a
re:
Strangely there is no problem with small values up to about 30 minutes!
That's not strange at all, if the maximum session
timeout value is 1440 minutes, or 24 hours,
as explained in my last message.

Anything higher than that will throw an error.

Sorry for not remembering that figure earlier.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Strangely there is no problem with small values up to about 30 minutes!

i tried 1 , 2 , 15 .....30. No timeout or what so ever.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OU**************@TK2MSFTNGP14.phx.gbl...
I'd suggest you test with smaller values,
so that you can run a number of tests
to check whether it runs OK or not.

Try setting timeout to 1 and refresh to 2.
That will allow you to test faster.

Then, depending on the results, you can increment.

If I recall correctly, the maximum session
timeout value is 1440 minutes, or 24 hours.

Anything higher than that will throw an error.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
No i'm not using out of process session.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Are you using out-of-process session state managemenet ?
( State Server or SQL Server ? )

If you are, Session_OnEnd might not get called.

Session_OnEnd only gets called if using InProc
( in-process ) session state management.

With SQL Server, there's a way to clean up
the expired sessions by running a SQL job.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:un**************@TK2MSFTNGP10.phx.gbl...
> in my case i want to do a refresh every hour (<meta
> http-equiv="refresh" content="3600">).so i set timeout=61. But this
> fails unexpectedely.
> Why?
>
>
>
> can i have session tiemout=20 when
> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
> news:e0**************@TK2MSFTNGP15.phx.gbl...
>> The refresh time is immaterial.
>>
>> If you have your session timeout set to 20 minutes,
>> and have a meta refresh, in all your pages, set to 19 minutes,
>> you could have your sessions continually refreshed, without the
>> need to accumulate RAM resources over 120 minutes.
>>
>> As long as a user has a page at your site open, the sessions
>> would be automatically extended for another 20 minutes.
>>
>> If they close all pages at your site, i.e., if they go away
>> permanently, then the sessions would expire 20 minutes
>> after the last page open was refreshed.
>>
>> There's really no need to have large session timeout values.
>>
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espaņol
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "jensen bredal" <je***********@yahoo.dk> wrote in message
>> news:e%****************@TK2MSFTNGP15.phx.gbl...
>>> But then how do i avoid my session to timeout still keeping the
>>> refresh
>>> time to 1 hour (3600 seconds)?
>>>
>>>
>>>
>>> "Juan T. Llibre" <no***********@nowhere.com> wrote in message
>>> news:%2****************@TK2MSFTNGP09.phx.gbl...
>>>> Actually, it makes a lot of sense that, if you have
>>>> timeout= 61 in <sessionState, that the sessions
>>>> would expire in approximately 3600 seconds.
>>>>
>>>> Remember that the timeout value is expressed in minutes.
>>>>
>>>> If you need a higher expiration time for your sessions,
>>>> set timeout= in <sessionState to 120, if that's what you need.
>>>>
>>>> If you do, the sessions will expire in 7200 seconds.
>>>>
>>>> Take note that the larger the session expiration time,
>>>> the more memory consumption and that, at some point,
>>>> you might wind up with a recycled application due to
>>>> lack of sufficient RAM, and all your sessions will expire anyway.
>>>>
>>>> You will have to experiment and look for a trade-off between
>>>> configured session expiration time and application recycling time.
>>>>
>>>>
>>>>
>>>> Juan T. Llibre
>>>> ASP.NET MVP
>>>> http://asp.net.do/foros/
>>>> Foros de ASP.NET en Espaņol
>>>> Ven, y hablemos de ASP.NET...
>>>> ======================
>>>>
>>>> "jensen bredal" <je***********@yahoo.dk> wrote in message
>>>> news:uT**************@TK2MSFTNGP09.phx.gbl...
>>>>>
>>>>> 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 running continuously and
>>>>> refreshing once an hour.
>>>>> I there set timeout= 61 in <sessionState section and on my
>>>>> page it says
>>>>> <meta http-equiv="refresh" content="3600">.
>>>>> I also set timeout=120 in the <forms section of web.config to make
>>>>> sure
>>>>> the cookie does not expire before the session has been renewed.
>>>>>
>>>>> But anyway i'm getting the temeout every 3600 seconds.
>>>>> Can someone explain this?
>>>>>
>>>>> Many thanks in advance.
>>>>>
>>>>> JB
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Nov 19 '05 #10

P: n/a
There you lost me again. My application has a page ( a news ticker) that
dinamicaly rotates records from a database. It should get new data every
hour . But when that is reached , then the session cookie expires. The sign
of that is that users are prompted with the login page.
But . I managed to set session timeout larger then refresh time. The refresh
should renew the session and 60 minutes should be really be much less then
24 hours. If that is the maximum value?
Shouldn't it. So i do not understand why this works for 30 minutes and not
for 60 minutes.

There are three things here:

1)The session cookie timeout,(i'm using session cookies for from login , not
persistant cookies)

-greater then refresh time
2)refresh time
-less then seeion cookie timeout and session timeout

3) Session timeout
-greater then refresh time

Does this make any sens?

Nov 19 '05 #11

P: n/a
re:
If that is the maximum value?
It is.
I just double-checked, and the maximum timeout period is 1440 minutes.

re: So i do not understand why this works for 30 minutes and not for 60
minutes.
I don't understand either. It should work for 60 minutes,
by setting the timeout to 60 and the refresh to, say, 3500.

The refresh is set in seconds; the timeout in minutes.

re: I managed to set session timeout larger then refresh time.
What values did you set for both ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:ek**************@TK2MSFTNGP09.phx.gbl... There you lost me again. My application has a page ( a news ticker) that
dinamicaly rotates records from a database. It should get new data every
hour . But when that is reached , then the session cookie expires. The
sign of that is that users are prompted with the login page.
But . I managed to set session timeout larger then refresh time. The
refresh should renew the session and 60 minutes should be really be much
less then 24 hours. If that is the maximum value?
Shouldn't it. So i do not understand why this works for 30 minutes and not
for 60 minutes.

There are three things here:

1)The session cookie timeout,(i'm using session cookies for from login ,
not persistant cookies)

-greater then refresh time
2)refresh time
-less then seeion cookie timeout and session timeout

3) Session timeout
-greater then refresh time

Does this make any sens?

Nov 19 '05 #12

P: n/a
> re:
So i do not understand why this works for 30 minutes and not for 60
minutes.


I don't understand either. It should work for 60 minutes,
by setting the timeout to 60 and the refresh to, say, 3500.

The refresh is set in seconds; the timeout in minutes.

re:
I managed to set session timeout larger then refresh time.


What values did you set for both ?


session cookie :
<forms ....loginUrl="Login.aspx" protection="All" timeout="60" path="/">
session timeout:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="60"
/>

refresh:

<meta http-equiv="refresh" content="3500">


Nov 19 '05 #13

P: n/a
> The sign of that is that users are prompted with the login page.

You said you are using forms authentication: the login page prompt could
be because the forms authentication cookie has timed out.

Did you set slidingExpriation="true" in the <forms> element (default is
false for .NET 1.1)?

Also you could try increasing the session timeout a bit at a time (62,
63, ...) or decreasing the refresh interval a bit at a time (3650, 3640,
...) until it works.

And put some tracing in the Session_Start and Session_End to see when it
expires.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #14

P: n/a
That should work, as it apparently does.

So, the problem was not really the settings for the
session timeout, nor the meta refresh timeout, but with
the cookie timeout, huh ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"jensen bredal" <je***********@yahoo.dk> wrote in message
news:O1**************@TK2MSFTNGP14.phx.gbl...
re:
So i do not understand why this works for 30 minutes and not for 60
minutes.


I don't understand either. It should work for 60 minutes,
by setting the timeout to 60 and the refresh to, say, 3500.

The refresh is set in seconds; the timeout in minutes.

re:
I managed to set session timeout larger then refresh time.


What values did you set for both ?


session cookie :
<forms ....loginUrl="Login.aspx" protection="All" timeout="60" path="/">
session timeout:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="60"
/>

refresh:

<meta http-equiv="refresh" content="3500">

Nov 19 '05 #15

P: n/a
slidingExpriation="true"

you got a point there. i did set to false because i thought the default was
true and not working. i will
try that.
thanks

"Joe Joe" <jo*@mailinator.com> wrote in message
news:eA*************@TK2MSFTNGP12.phx.gbl...
The sign of that is that users are prompted with the login page.


You said you are using forms authentication: the login page prompt could
be because the forms authentication cookie has timed out.

Did you set slidingExpriation="true" in the <forms> element (default is
false for .NET 1.1)?

Also you could try increasing the session timeout a bit at a time (62,
63, ...) or decreasing the refresh interval a bit at a time (3650, 3640,
..) until it works.

And put some tracing in the Session_Start and Session_End to see when it
expires.
*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #16

P: n/a
well that did not help!

Although i was almost sure it could have made sens.
Nov 19 '05 #17

P: n/a
Have you checked to see if the asp.net worker process is being aborted
unexpectedly? If it is, it looks like a session timeout when in reality it
is just dumping the session when the worker process goes down.

Nov 19 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.