'Click on ASP .Net Core Identity Log In button leads to 400 error

I'm writing simple asp .net core 2.2 MVC app with individual authorization (ASP Identity) hosted on IIS 10. If user navigates to Login page, stays idle for 20+ minutes (which is IIS default timeout to terminate app pool) and click on log in button - browser gets a 400 response and shows blank page. If user updates (F5) login page before click to log in - everything works fine. IIS pool settings all default, but pipeline is changed to No Managed Code. APS Identity Code default too (only registration modified a little). Can anyone suggest how to resolve this idle login case?

I tried to disable AntiForgery Token Validation but it doesn't help.



Solution 1:[1]

I resolved the issue. On my app pool settings loadUserProfile was set to False by default. After I changed it to True everything started to work fine. Don't know why it cause problems in False state though.

Solution 2:[2]

I resolved this issue by removing the [ValidateAntiForgeryToken] from the method(for which pag in MVC application.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Evgeny
Solution 2 Saranjit