Skip to main content

Posts

Showing posts from 2019

FormsAuthentication.Encrypt returns null

There are several reason that the FormsAuthentication.Encrypt() returns null:              FormsAuthenticationTicket  ticket = new  FormsAuthenticationTicket (                         1, // version                         identity.Name, // Name                          DateTime .Now, // issue date,                          DateTime .Now.AddDays(1), // expiration date, created above                          false , // persistent or not                         jsSerializer.Serialize(identity) // User data             );     ...