0 Replies - 5613 Views - Last Post: 23 April 2012 - 05:49 AM

#1 ankit9   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 18-February 11

FormsAuthentication.SetAuthCookie Or FormsAuthenticationTicket

Posted 23 April 2012 - 05:49 AM

FormsAuthentication.SetAuthCookie Or FormsAuthenticationTicket which would be a better one....

a few seconds ago|LINK

hi!! i am using Forms Authentication and i am little confused... should i use SETAutCookie mthod ore the ticket method....

i mean should i use.. FormsAuthentication.SetAuthCookie(email_txt.Text, true);


FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, "aut_ticket", DateTime.Now, DateTime.Now.AddDays(2), true, email_txt.Text);

if i use the FormsAuthenticationTicket ticket is it necessary to encrypt the ticket..... my website is not an e-commerce website

string encryptedTicket = FormsAuthentication.Encrypt(ticket);

and i think creating an authentication ticket would be more efficient.... and also i would just have to check if that ticket is present on every page.... for an authenticated user...

AND ALSO, how can i check whether the ticket is present or not.....

Can Someone Please Guide me which one would be better

Thanks in ADvance..... :)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1