-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor .NET 8 Automatic Logout on Plesk Hosting #60533
Comments
@MahdiElahi thanks for contacting us. Does the same problem happen if you use an MVC application instead of Blazor? |
@javiercn |
It could be that the keys used to encrypt and decrypt your authentication cookies are getting lost when the underlying container hosting your application gets spun down. If you enable data protection logging, do you see anything like the following?
The good news is you have a lot of control over how keys are stored. https://learn.microsoft.com/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-8.0 should demonstrate how you can store the keys in a location that you know will be persisted long term like a database or a shared volume. If it's not a data protection issue, I recommend turning on all debug level logs and providing those. Hopefully that shouldn't be too much if the issue only takes 40-50 seconds. |
Hello everyone,
I have created a Blazor .NET 8 project and deployed it on a Plesk hosting panel. However, I’m facing an issue where the user is automatically logged out after 40–50 seconds.
This problem does not occur on localhost, only on the hosted version.
I have tried modifying session and cookie timeout settings in Program.cs, but the issue persists.
Here is my Program.cs configuration:
GitHub Link
Does Blazor require any specific settings on Plesk? Or should I make any additional changes?
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: