0

hi
When I log out from the site even then my user name appears at the top line of the window. and when I closed the net and re open giving the address www.daniweb.com even then my user name appears in the window and when I click the name it automatically gets log in.

I have tried several times but the problem is still there.
Pl help

6
Contributors
10
Replies
11
Views
10 Years
Discussion Span
Last Post by sandeep.thakur1
0

Hello my friend,

Your making sure to click "LOGOUT" right?

After you logout,simply refresh the page and you should indeed by logged out!

Good luck!

0

yes, it is working but when I click Back botton the name is still appearing but for name shake only as I have to re-log in.

0

When you click the back button in your browser, your computer is loading the cached version of the page for you.

-1

Hi !,
Today i too faced same problem so have solution now, may be this will help you.
you need to add this code to every page's "init" n not to login page please.

Response.Cache.SetCacheability(HttpCacheability.NoCache) 'stopping caching for login
        If Session("Logged_IN").Equals("No") Then
      Response.Redirect("Login.aspx")
        End If

and here is my global.asax file for your reference.
you need toset your like this.

<%@ Application Language="VB" %>

<script runat="server">

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs on application startup

    End Sub

    Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs on application shutdown
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when an unhandled error occurs
    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when a new session is started


        '<summary>
        '   |Fires when the session is started
        '   |Administrator will only be allowed a certain number of login attempts
        '</summary>
        Session("Num_of_Tries") = 3
        Session("LoginCount") = 0

        '   |Track whether they're logged in or not
        Session("Logged_IN") = "No"

    End Sub

    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when a session ends. 
        ' Note: The Session_End event is raised only when the sessionstate mode
        ' is set to InProc in the Web.config file. If session mode is set to StateServer 
        ' or SQLServer, the event is not raised.
    End Sub

</script>

Edited by diafol: fixed formatting

Votes + Comments
Are you actually trying to be helpful, or do you take delight in posting random crap on the web?
0

I'm able to successfully log out on Internet Explorer, FireFox, and Opera on Windows Vista and in Safari and FireFox on OS X.

0

Well now I'm confused. [Mods, feel free to undelete the post I deleted and perhaps split this thread.]

I couldn't log out (from FF). I deleted all cookies (crap, but WTH). Then I could achieve a logout.

I logged in to respond to Dani's response which apparently beat my deletion, and now I'm trying to figure out IN/OUT. This end of the pipe is confused.

[edit]Heck just delete my bumpage. I seem to have resolved it on this end.

0

Hmm.. actually, I'm now experiencing that problem. I've tried logging out in firefox on ubuntu and vista, but it doesn't ever actually log me out. :-/

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.