Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms Auth expires...
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00971155
Message ID:
00971897
Vues:
15
I don't want to create an AuthTicket... I was to look at the expires property from the authticket of the user that made the last request.

BOb


>I have an authenticated user, I want to see the FormAutentication tickets Expires value. Any one know how to do this? Here is what I tried but it jsut displays 1/1/0001 12:00 AM...
>
><%= "Auth Expires: " + Request.Cookies.Get FormsAuthentication.FormsCookieName).Expires.ToString()

>
>Try something like this:
>
>
>FormAuthenticationTicket authTicket =
>     New FormAuthentictationTicket(
>     1,                           // Version Number
>     LoginName,                   // User Name
>     DateTime.Now,                // Creation DateTime
>     DateTime.Now.AddMinutes(20), // Expiration DateTime
>     false,                       // persistant
>     Roles,                       // comma delimited
>     "/")                         // Cookie Path
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform