Forms Authentication Timeout Logging

后端 未结 1 691
北恋
北恋 2021-01-07 07:30

I want to detect when a asp.net Form Authentication ticket has expired. I then want to log to the server the user that was signed out because of inactivity. Is there an ev

相关标签:
1条回答
  • 2021-01-07 08:08

    Session and forms authentication have two completely separate timeouts. See my posting on this here:

    How can I handle forms authentication timeout exceptions in ASP.NET?

    In Application_PreRequestHandlerExecute you need to check the ticket.

    Also be sure your session and forms auth timeouts are in sync using the code I posted there. Not just setting both to say 60 minutes. Since forms auth doesn't update the 'touched' time until half of the time passes by, and session time is updated on every request, they get out of sync.

    0 讨论(0)
提交回复
热议问题