Re: How do I change the session timeout?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



re:
Ok, I changed the timeout to 3 (minutes), restarted IIS

You don't need to restart IIS.
Editing web.config will start a new application instance and session.

re:
!> logged in to my app which we use the ASP.NET membership/role provider for,
!> waited 5 minutes, then went to a different page and it displayed that page
!> - I was still logged in.

!> If I wait 21 minutes and go to a different page it makes me log in again.

If you want your application, which uses ASP.NET membership,
to not keep you logged in for 20 minutes, change the timeout for
the forms authentication cookie.

The session duration has no bearing on the duration
of the timeout period configured for forms authentication.

Look for the "timeout" element of the forms authentication section
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
protection="All"
timeout="20"
etc...

/>

....and change *that* timeout to whatever you want to, in minutes.

You will see that the logged-in period changes to match the number of minutes you specify.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:3B7992A6-EE6B-43F7-8168-3D6143FB42D3@xxxxxxxxxxxxxxxx
Hi;

Ok, I changed the timeout to 3 (minutes), restarted IIS, logged in to my app
which we use the ASP.NET membership/role provider for, waited 5 minutes, then
went to a different page and it displayed that page - I was still logged in.

If I wait 21 minutes and go to a different page it makes me log in again.

Am I not understanding something on the session timeout?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Steven Cheng[MSFT]" wrote:

Hi Dave,

As for ASP.NET SessionState, the timeout setting does be the "timeout"
attribute of the <sessionState> element:

#sessionState Element
http://msdn2.microsoft.com/en-us/library/h6bb9cz9.aspx

As for the session timeout behavior, how did you found that the session
hasn't been timeout. When a old session has been timeout, a new one will be
started. Have you checked the sessionID to verify that a different
sessionID has been established?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.












.



Relevant Pages

  • RE: How do I change the session timeout?
    ... Am I not understanding something on the session timeout? ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I change the session timeout?
    ... A session will last for as long a period as you set in ... That's set in the forms timeout property. ... You will see that the logged-in period changes to match the number of minutes you specify. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I change the session timeout?
    ... But how are the session and login seperable? ... of the timeout period configured for forms authentication. ... You will see that the logged-in period changes to match the number of minutes you specify. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Application Pool timouts.
    ... a) From what i understand, the application pool timeout is the timeout for ... an idle session which is created by a browser. ... is idle for 20 minutes or longer the problems occur. ... Application Pool's w3wp.exe process to be shutdown by IIS when no requests ...
    (microsoft.public.inetserver.iis.security)
  • Re: How do I change the session timeout?
    ... A session will last for as long a period as you set in ... That's set in the forms timeout property. ... You will see that the logged-in period changes to match the number of minutes you specify. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)