foxlearn
  • Home
  • How to
  • Donate
  • About
  • Contact
  • Privacy

How to set cookie ValidationInterval in ASP.NET Core

By Tan Lee Published on Feb 18, 2024  446
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.

Tan Lee

Related

  • How to Initialize TagHelpers in ASP.NET Core with Shared Data
  • Boost Your ASP.NET Core Website Performance with .NET Profiler
  • The name 'Session' does not exist in the current context
  • Implementing Two-Factor Authentication with Google Authenticator in ASP.NET Core
  • How to securely reverse-proxy ASP.NET Core
  • How to Retrieve Client IP in ASP.NET Core Behind a Reverse Proxy
  • Only one parameter per action may be bound from body in ASP.NET Core
  • The request matched multiple endpoints in ASP.NET Core

Categories

  • Articles121
  • C#8
  • SQL14
  • Windows Forms307
  • ASP.NET10
  • ASP.NET Core23
  • Design Patterns5
  • Source Codes1
  • Javascript3
  • Domain & Hosting2
  • Windows1
  • Visual Studio10
  • HTML Templates77
  • Crystal Reports4
  • PowerShell3
  • Entity Framework1

Popular Posts

Entity Framework Code First vs Database First vs Model First Approach
Entity Framework Code First vs Database First vs Model First Approach
 Dec 19, 2024
Freedash bootstrap lite
Freedash bootstrap lite
 Nov 13, 2024
Bootstrap 4 Login Page Template
Bootstrap 4 Login Page Template
 Nov 11, 2024
Materio Admin Template
Materio Admin Template
 Nov 13, 2024
Material Lite Admin Template
Material Lite Admin Template
 Nov 14, 2024

Copyright © 2016 - 2025 FoxLearn. All Rights Reserved

Home | Donate | About | Contact | Privacy Policy