Why are my forms authentication tickets expiring so fast?

前端 未结 5 2143
鱼传尺愫
鱼传尺愫 2021-02-08 14:26

I\'m using forms authentication in an ASP.NET application. I configure the FormsAuthenticationTicket to expire in 1 year but it actually expires after 1 hour or so.

5条回答
  •  天涯浪人
    2021-02-08 15:17

    The only thing that I can see that is non-standard is that you are passing id.ToString() to the FormsAuthenticationTicket constructor. I usually pass the username in this parameter. Not sure whether this will make a difference, but worth a try.

提交回复
热议问题