C# ASP.NET窗体身份验证票证超时

C# ASP.NET窗体身份验证票证超时,c#,asp.net,forms,cookies,forms-authentication,C#,Asp.net,Forms,Cookies,Forms Authentication,创建具有指定超时的自定义ASP.NET窗体身份验证票证的最佳方法是什么?超时值来自数据库,而不是web.config 谢谢 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, "userName", DateTime.Now, DateTime.Now.AddMinutes(30), // value of time out property fa

创建具有指定超时的自定义ASP.NET窗体身份验证票证的最佳方法是什么?超时值来自数据库,而不是web.config

谢谢

 FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
        "userName",
        DateTime.Now,
        DateTime.Now.AddMinutes(30), // value of time out property
        false, // Value of IsPersistent property
        String.Empty,
        FormsAuthentication.FormsCookiePath);