Find out why asp.net authentication ticket expires

I need help figuring out why my confirmation ticket expires in about an hour on my hosted website. But if I run the site locally, the authentication ticket will stay alive at the right time.

This is my localhost web.config:

<authentication mode="Forms">
    <forms loginUrl="~/Account/LogOn" timeout="20160" slidingExpiration="true" path="/" />
</authentication>

and this is my hosted web.config:

<authentication mode="Forms">
    <forms loginUrl="~/Account/LogOn" timeout="20160" slidingExpiration="true" domain=".mywebsite.com" path="/" />
</authentication>

I know that an authentication ticket is created because:

  • I see it in a cookie browser
  • I remain in the system even after closing the browser and reopening
  • I remain included in the system even after reusing the website (changing and saving web.config for its disposal).

When I check the expiration date of the cookie in the browser, it is after 2 weeks. However, after about an hour, my authentication always ends.

, , - ? , , -, .

1: 1 , , cookie . , 2 . , , .

+5
3

machinekey system.net. - :

    <machineKey validationKey="aaa"
    decryptionKey="bbb" validation="SHA1" />

. , . , 500 , .

+5

, :

  • IIS . , .
  • IIS 7 :
0

-, machine.config ? machine.config web.config.

0

All Articles