Redirect any page to Login screen on Session timeout ASP MVC 6

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Redirect any page to Login screen on Session timeout ASP MVC 6



So far I have the following but it seems not to be working.


services.ConfigureApplicationCookie(options =>

options.LoginPath = "/Account/LogIn";
options.LogoutPath = "/Account/LogOff";
options.CookieName = "Yummy";
options.ExpireTimeSpan = TimeSpan.ParseExact(Configuration.GetValue<string>("Authorization:ExpireTimeSpan"), "c", null);
options.AccessDeniedPath = "/";
options.ReturnUrlParameter = CookieAuthenticationDefaults.ReturnUrlParameter;
options.SlidingExpiration = true;
options.Cookie.HttpOnly = true;
);




1 Answer
1



Follow below URL for Autologut



Use Usertimeout js for Auto redirect to login page





Is there a way to do this without any javascript library
– Tushortz
Aug 6 at 14:02





I think it is not possible in back side but i am not sure
– NIts577
Aug 6 at 14:09






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS