Logged in users get logged out after some time

后端 未结 2 981
一生所求
一生所求 2021-02-06 08:44

I made a new MVC3 application and it\'s hosted on WinHost\'s basic plan.

The gist of the problem is, the app pool memory limits are reached and every session InProc is e

相关标签:
2条回答
  • 2021-02-06 09:00

    It is caused some times because the garbage collector cleans the machine key assigned to your application and assigns a new key that causes the looged in users to log out. Solution is to generate a machineKey for your application and place it in the web.config under system.web like

    <system.web>
        <machineKey validationKey="###YOUR KEY HERE ###"
                    decryptionKey="## decrypt key here ##" 
                    validation="SHA1" decryption="AES" />
    ...
    ...
    

    this link may help you http://aspnetresources.com/tools/machineKey

    0 讨论(0)
  • 2021-02-06 09:06

    Forms auth is not session related, at all. It has nothing to do with session state. Everything required is stored in the forms auth cookie.

    Your timeout above is set to 2880, so 48 hours i.e. two days so I would expect timeouts to happen.

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