Solved

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

Posted on 2011-03-23
1
893 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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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