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

Strange session timeout problem(urgent help needed).


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
17 5156
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
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
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
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
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
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
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
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
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
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
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
> 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
> 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
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
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
well that did not help!

Although i was almost sure it could have made sens.
Nov 19 '05 #17
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Don Nelson | last post by:
hi, I am using SQL server 2000.and trying to resolve a deadlock issue.For this i am looking at SQL profiler.and while turning the trace on, i select Lock:Timeout event that needs to be traced.When...
4
by: Sachin Jagtap | last post by:
Hi, I am getting exception while poping item from queue, I am writing messages coming from client in a queue in one thread and then in other thread i am reading from queue and writing in file....
2
by: WantedToBeDBA | last post by:
Hi all, We have db2 installed on AIX box (db2 version - 8.1). Its started and i am able to view 50000(default port) in netstat(netstat -a -n). But when i try to connect using telnet, i am getting...
3
by: Niloday | last post by:
Hi All, I have developed a web service and deployed it on the Win2000 box. I can access the web methods of this web service when my client application is debugged from VS.NET studio. But it...
0
by: B0nj | last post by:
I have got a web application that now doesn't use session state after I eliminated all session variables, opting to banish them all to the querystring for better performance I have turned...
1
by: Daniel | last post by:
Hi, i'm using the session in my project and each user will be given the access based on his role. On my computer i try to run the program, the session works fine. The problem occurs when i try to...
0
by: amjad | last post by:
Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server this error i get when i tried to run my application and want to use sql server to store...
1
by: Hemant Pathak | last post by:
Hi All i have develop a software(Customer Service Managment System) front end is VB 6.0 and Back end is SQL 2000 i want to run this software is Server System and Client System the how can i do this....
2
by: ruchikagupta | last post by:
i have a grid view with two select command buttons and i want to track which one is clicked how can i do tht can any1 plz help its really urgent
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.