How to set cookie ValidationInterval in ASP.NET Core
By FoxLearn 2/18/2024 9:43:21 AM 162
This post shows you How to set cookie ValidationInterval in ASP.NET Core.
Opening your Startup class, then add a configuration as shown below.
services.Configure<SecurityStampValidatorOptions>(options => { options.ValidationInterval = TimeSpan.FromDays(1); });
You should add an AddIdentity first and ConfigureApplicationCookie after.
- Getting Started with ASP.NET Core 3.0
- How to fix 'Authorization in ASP.NET Core' with 401 Unauthorized
- The name 'Session' does not exist in the current context
- How to create a Toast Notifications in ASP.NET Core
- How to Minify HTML using WebMarkupMin in ASP.NET Core
- How to fix 'IMvcBuilder' does not contain a definition for 'AddNewtonsoftJson'
- How to fix System.InvalidOperationException: Scheme already exists: Identity.Application
- How to fix 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer'
Categories
Popular Posts
How to sign a powershell script
10/03/2024
How to get Credentials in PowerShell?
10/03/2024
How to implement Jint in C#
09/14/2024