Solved

ASP.NET Membership - Force user back to login page when login expires

Posted on 2011-03-23
1
898 Views
Last Modified: 2012-08-14
I'm using ASP.NET membership provider for the first time in a web application so I'm not extremely familiar with all of it's inner workings.

I basically have 2 issues...
1) I'm not sure how long a user is supposed to stayed logged in by default, but the login doesn't ever seem to expire.  How is this configured?
2) When a login is expired, or when a user logs out, how do I make it force the user back to the login page?  Do I have to write code for this or is there a way to set it up in the web.config so it will happen automatically.

Thanks.
0
Comment
Question by:JosephEricDavis
1 Comment
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 500 total points
ID: 35201799
Follow this article for more information on forms authentication, but the timeout is set in one of two places:  The web.config or in the actual callto FormsAuthenticateTicket.  If the call to FormsAuthenticateTicket has a timeout in it, then it takes precedence and whatever you put in the web.config is ignored:
http://support.microsoft.com/kb/301240

Your second question is best answed by this article:
http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.signout(v=VS.90).aspx
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with error in Query 2 31
Open a link in vb.net 2 16
ASP.NET (VB) return a record 2 40
Problem to Office 1 18
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question