2

The constructors for manually creating FormsAuthenticationTicket objects force us to set an "expiration" value, and this value overrides the "timeout" setting in web.config in my tags, which is not what I want, because now the user doesn't timeout. The "session" just expires at the given time.

I need to manually create my ticket for UserData reasons, and it is just the way I decided to build my app. I guess I could spend a whole lot of time and redo the way my app. authorizes, and store the "userdata" elsewhere... but this seems extremely tedious for something so small..

Is there anyway to manually create an Auth Ticket and still maintain timeout settings?! And by timeout, I mean resetting the timer on user activity. Not a fixed timeout! Please help!

1
  • Personally I've found that using UserData was more pain than it's worth...just store the data in a separate cookie if you can. Commented Dec 29, 2010 at 2:32

1 Answer 1

1

If you set the slidingExpiration="true" in web.config for your forms element, I think it should take care of resetting the timer even if you pass the expiration date. If you don't create the ticket manually, then the ticket created automatically behind the scene uses the timeout you set in forms element or default(30mins) while creating the FA ticket.

Check the following links:

FAT Timeout

Weird Timeout with custom FA

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much. Although this is only half of what I want, this is very helpful. I would like to reset the timer when the user moves, clicks, or key presses anywhere on the page, not only when the user makes another request after the halfway mark >_< But "you can't always get what you waaaant." ;) Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.