ASP.NET Forms Authentication failed for the request. Reason: The ticket supplied has expired

前端 未结 5 2067
我在风中等你
我在风中等你 2020-12-10 10:49

I am getting this error many times in the event log and users are logged out.

Event code: 4005
Event message: Forms authentication failed for t

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 11:15

    Sounds like an error you would get when your forms authentication ticket has expired. What is the timeout period for your ticket? Is it set to sliding or absolute expiration?

    I believe the default for the timeout is 20 minutes with sliding expiration so if a user gets authenticated and at some point doesn't hit your site for 20 minutes their ticket would be expired. If it is set to absolute expiration it will expire X number of minutes after it was issued where X is your timeout setting.

    You can set the timeout and expiration policy (e.g. sliding, absolute) in your web/machine.config under /configuration/system.web/authentication/forms

提交回复
热议问题