How do I solve an AntiForgeryToken exception that occurs after an iisreset in my ASP.Net MVC app?

后端 未结 6 735
不思量自难忘°
不思量自难忘° 2020-12-04 11:12

I’m having problems with the AntiForgeryToken in ASP.Net MVC. If I do an iisreset on my web server and a user continues with their session they get bounced to a login page.

6条回答
  •  青春惊慌失措
    2020-12-04 11:30

    If I do an iisreset on my web server and a user continues with their session they get bounced to a login page.

    There's no reason an iisreset to bring the user to the login page. If you use cookies to track authentication information and have a stateless application, the user should stay authenticated even after a server reboot (of course if a request is made during the reset it will fail).

提交回复
热议问题