Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-23
1
Medium Priority
?
920 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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