How to set cookie ValidationInterval in ASP.NET Core
By Tan Lee Published on Feb 18, 2024 365
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.
- 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
- How to Create a custom model validation attribute in ASP.NET Core
Categories
Popular Posts
11 Things You Didn't Know About Cloudflare
Dec 19, 2024
RuangAdmin Template
Nov 13, 2024
AdminKit Bootstrap 5 HTML5 UI Kits Template
Nov 17, 2024
Simple Responsive Login Page
Nov 11, 2024