views:

278

answers:

1

I need to set memebership timeout to be less than session timeout to avoid using the membership and the login session is expired, this is a problem that i face in my asp.net application that i am using login control and when the user send a comment and the login control session is expired it should not accept the comment and i knew later that i have to make membership timeout expire before login control session expiration.

So how can i make membership timeout to expire b4 session expiration??

Thanks in advance

+3  A: 

You could set the timeout for the session and authentication cookies:

<authentication mode="Forms">
  <forms
    loginUrl="/login.aspx"
    requireSSL="true"
    protection="All"
    timeout="15"
    domain="example.com"
    slidingExpiration="true"
    name="auth_cookie" />
</authentication>

and the session:

<system.web>
    <sessionState 
      mode="InProc"
      cookieless="false"
      timeout="20" />
</system.web>
Darin Dimitrov