• Got a Tipila, google, windows live or facebook account ?

Use this code to get the encrypted text of the forms authentication link.

 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(userName, false, 60);

or

FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
            username,
            DateTime.Now,
            DateTime.Now.AddMinutes(30),
            isPersistent,
            userData,
            FormsAuthentication.FormsCookiePath);
   // Encrypt the ticket.
   string encTicket = FormsAuthentication.Encrypt(ticket);

More info http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationticket.aspx

0
votes
Hi...!!!

Tipila is a site for programmers to save interesting things found on the web, as Tips.

No more wasting time by re-googling for things you've found but forgotten.

It's totally free...
Get started now

Login to Tipila