Cookie timeout after 30 Sec (Not Reset) It will redirect me to Login page

By Sumandeep singh Thind

I am facing issue with cookie timeout I used every thing. Its working fine on my system IIS but when deployed to server It is creating a issue.I am Using [Authorize in MVC. I used Below given Settings:

WebConfig:

Code
var authTicket = new FormsAuthenticationTicket(
1,
userList.UserName,
DateTime.Now,
DateTime.Now.AddMinutes(20),
false
,userData
);

   string encryptedTicket = FormsAuthentication.Encrypt(authTicket);

var authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);

            if (authTicket.IsPersistent)
            {
                authCookie.Expires = authTicket.Expiration;
            }
            System.Web.HttpContext.Current.Response.Cookies.Add(authCookie);

Source: Stack Overflow

    

Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273