I’m just a little confused about something. When creating forms authentication tickets I have been using this code.
var ticket = new FormsAuthenticationTicket(1,
userName,
DateTime.Now,
DateTime.Now.AddMinutes(30),
rememberMe,
userData,
FormsAuthentication.FormsCookiePath);
My question is this. Should I use DateTime.Now as this example shows or DateTime.UtcNow?
Server uses this values to detect session expiration. So it has to be the same timezone on creating ticket and on checking it. Use
DateTime.Now.Btw, if applicable to your case, it’s easier to do