Authentication Ticket expiration
From: Mike Forman (ec-nospam@microsoft.com)
Date: 04/14/03
- Next message: Michael Leung: "UNC file share and NTLM user identity"
- Previous message: Allison Sutherland: "ASPNET permissions and rights on Locked down IIS"
- Next in thread: Victor Garcia Aprea [MVP]: "Re: Authentication Ticket expiration"
- Reply: Victor Garcia Aprea [MVP]: "Re: Authentication Ticket expiration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Mike Forman <ec-nospam@microsoft.com> Date: 13 Apr 2003 16:40:48 -0700
I'm, using the following example from
http://support.microsoft.com/?id=308157
and am having a few problems.
The following snippet works great for creating a persistant/non-persistant
ticket
============
tkt = New FormsAuthenticationTicket(1, txtUserName.Value, DateTime.Now(), _
dateTime.Now.AddMinutes(30), chkPersistCookie.Checked, "your custom data")
cookiestr = FormsAuthentication.Encrypt(tkt)
ck = new HttpCookie(FormsAuthentication.FormsCookieName(), cookiestr)
if (chkPersistCookie.Checked) then ck.Expires=tkt.Expiration
Response.Cookies.Add(ck)
============
HOWEVER, the ticket seems to get renewed every time I post back to the server.
What I really want to do is force the Authentication to expire after X minutes
if the does/doesn't post back to the server.
The only exception to this is I want the authentication to expire immediatly if
the user closes the browser, but this seems to be working.
What I want is something like what Yahoo mail uses. When you login, you enter
your username/password and can either "Remember my ID and Password". If the
user says no, then when they close their browser, they have to login again. If
the user checks yes, they don't have to login again UNLESS 8 hours pass from
since the time they log in.
Any suggestions?
-Mike
- Next message: Michael Leung: "UNC file share and NTLM user identity"
- Previous message: Allison Sutherland: "ASPNET permissions and rights on Locked down IIS"
- Next in thread: Victor Garcia Aprea [MVP]: "Re: Authentication Ticket expiration"
- Reply: Victor Garcia Aprea [MVP]: "Re: Authentication Ticket expiration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|