Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

how to automatically show user he's been logged out

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith G Hicks - 08 Mar 2008 18:23 GMT
asp.net 2.0

I have set my web.config as follows: <forms timeout="30"/> (I know that's
the default but I may chang it so the line's in there)

I also have a few cookies I'm setting on my login page to hold the UserName,
UserID and the value of another field in my db so that as the user is
navigating around the site I can test for certain things. All that seems to
be fine. I've set the cookies to expire in 30 minutes also to coordinate
wiht the login stuff in asp.net 2.

I tested all this by setting the above times to 1 minute. If I log in and go
to a page that requires login and then don't do anythign for one minute and
then try to do something that requires me to be logged in, the login page
appears again and all's good.

The problem is that I have my login link and my LoginName control on my
master page and so even after the timeout has occurred, those still indicate
the user is logged in. They don't change to the logged out state until after
I try to do some action. I'd like to update these automatically and put a
message up that says the user has been logged out when that happens. I've
been to many websites where this is done. My bank's site for example does
this. After 10 minutes of inactivity, I'm logged out and the page is updated
to reflect the fact that I'm no longer logged in. I'm presented with the
login text boxes again. How can I do this same thing? How can I
automatically update the page to show that after the timeout the user has to
log in again. Otherwise, even though the user is actually no longer
authenticated, the page seems to indicate that he's still logged in.

Thanks,

Keith
Keith G Hicks - 10 Mar 2008 15:22 GMT
Anyone? Bueller? Anyone?

> asp.net 2.0
>
[quoted text clipped - 28 lines]
>
> Keith
Larry Bud - 10 Mar 2008 19:58 GMT
> Anyone? Bueller? Anyone?
>
[quoted text clipped - 34 lines]
> > log in again. Otherwise, even though the user is actually no longer
> > authenticated, the page seems to indicate that he's still logged in.

It has to be handled with a timer on the clint via Javascript.  That
timer has to be set to the same as the session timeout.  Once the
timer runs out, forward to another page (or display a hidden <DIV>
that tells the user he's logged out).

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.