Cookie expiration datetime and different date in client and server
<p>I am using the following code for a custom "remember me" implimentation:</p>

<pre><code>        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, member.UserName, DateTime.Now, DateTime.Now.AddHours(24), true, dataString);
        string encTicket = FormsAuthentication.Encrypt(ticket);
        HttpCookie faCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encTicket);
        faCookie.Expires = ticket.Expiration;
        HttpContext.Current.Response.Cookies.Add(faCookie);
</code></pre>

<p>But some users cannot login (Login page appears even after sign in).<br/>
It seems the problem is caused by the client having a different (greater) date than the server.
So, what is the best and correct solution for a "remember me" implementation.<br/>
To solve this problem I must remove this line:</p>

<pre><code>faCookie.Expires = ticket.Expiration;
</code></pre>

<p>After removing this line, when user closes the browser, he must sign in (cookie is not persist).
What is the solution?</p>
