473,287 Members | 1,643 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,287 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 5159
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: 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"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.