How to set cookie ValidationInterval in ASP.NET Core
By FoxLearn 2/18/2024 9:43:21 AM 91
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.
- 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
- The name 'Session' does not exist in the current context
- How to fix 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer'
- How to fix Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing
- How to Increase upload file size in ASP.NET Core
- How to fix LoginPath not working in ASP.NET Core
Categories
Popular Posts
C# Tutorial
07/20/2024
How to Download Microsoft SQL Server
06/22/2024
What Are RESTful Web Services?
02/19/2024