Forms Authentication timing out when it shouldn't?

前端 未结 4 424
无人共我
无人共我 2021-02-06 14:59

I have a problem with an ASP.NET application that is driving me nuts.

When a user leaves a page inactive for a period of time the session was timing out and error were b

相关标签:
4条回答
  • 2021-02-06 15:32

    This may also happen when iis recycles or terminates the application pool.

    You may want to check Troubleshoot Forms Authentication It could be that the client lost their cookie.

    If you manually generate the authentication ticket, you need to set the timeout in code and not the web.config

    0 讨论(0)
  • 2021-02-06 15:36

    Have you checked against an application pool or worker process recycling causing the problem?

    0 讨论(0)
  • 2021-02-06 15:38

    Don't mean to state the obvious, but:

    1. Are the Session and FormsAuthentication timeouts set to the same value?
    2. Is slidingExpiration set to true?
    0 讨论(0)
  • 2021-02-06 15:38

    Thanks for the response guys: I have already explicitly set slidingExpiration to true in the web.config with no effect.

    The timeout values are: Session: 20 minutes FormsAuthentication: 60 minutes

    I have left the session timeout as is and reduced the FormsAuthentication to 12 minutes for testing. The defrib 'pings' every 10 minutes. If I leave the page inactive for 14 minutes and then click a button I get the problem #edit: but not everytime it seems!#.

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