Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:04:45+00:00 2026-06-09T23:04:45+00:00

For the past few months, we’ve had users complaining that their authentication was sometimes

  • 0

For the past few months, we’ve had users complaining that their authentication was sometimes expiring early – after only 20 minutes of inactivity, despite the fact that we have authentication timeouts set to 30. I discovered today that SlidingExpiration only resets when there’s less than half of the auth time left, leaving open the possibility of doing something, waiting ten minutes, doing something else, waiting 21 minutes, and getting an ‘early’ timeout.

Are there any potential downsides to doing something like this in my Master Page’s Page_Load?

if(CurrentUser != null) {
    FormsAuthentication.SetAuthCookie(CurrentUser.UserName, false);
}

…and thus resetting the sliding expiration with every request?

Edit:

This code is what I wound up using; it only resets the token once per minute.

var cookie = Request.Cookies[FormsAuthentication.FormsCookieName];
var ticket = FormsAuthentication.Decrypt(cookie.Value);

if (ticket.IssueDate.AddMinutes(1) < DateTime.Now && ticket.IssueDate.AddMinutes(30) > DateTime.Now) {
    FormsAuthentication.SetAuthCookie(currentUser.UserName, false);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:04:47+00:00Added an answer on June 9, 2026 at 11:04 pm

    The biggest downside is that it will disable caching, e.g. <%@ OutputCache %> directives will no longer function correctly. So you might start seeing a performance hit due to cache misses.

    If you’re able to, the easiest thing to do would be to bump the expiration timeout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For the past few months i've had the feeling that i reached a boundry
I've been getting into Ruby over the past few months, but one thing that
I have been using ASP.NET MVC for the past few months, after successfully ignoring
I've been learning about divs over the past few months, and am now able
I've been using Heroku normally in the past few months. In the beginning, I
I have just started learning NHibernate. Over the past few months I have been
For the past few years, I've generally accepted that if I am going to
For the past few months I've been learning and coding successful apps and websites
My Delphi installation has been going downhill for the past few months. It seems
Thanks to everybody who has helped over the past few months trying to help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.