Код: Выделить всё
if (HttpContext.Current.Response.Cookies[AuthTokenName] == null)
{
HttpCookie authCookie = new HttpCookie(AuthTokenName);
authCookie.HttpOnly = false;
authCookie.Value = result.AccessToken;
authCookie.Expires = DateTime.Now.AddDays(-1);
// tried both of these methods
HttpContext.Current.Response.AppendCookie(authCookie);
//HttpContext.Current.Response.Cookies.Add(authCookie);
}
else
{
HttpContext.Current.Response.Cookies[AuthTokenName].Value = result.AccessToken;
}

Я неправильно установил файл cookie?