Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Logout! 1

Status
Not open for further replies.

blueark

Technical User
Apr 16, 2002
1,212
IE
Hi, I've put a simple page together using Visual Web Developer 2005 Express Edition. There's a Master Page, which isn't too complicated, and on one of the content pages, I have the following code:

Code:
[blue]<%@[/blue] Page Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" Title="Untitled Page" [blue]%>[/blue]
[blue]<[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]Content[/maroon] ID="Content1"
    ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"[blue]>[/blue]

        [blue]<[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]Login[/maroon] ID="Login1" runat="server"[blue]>[/blue]
        [blue]</[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]Login[/maroon][blue]>[/blue]

        [blue]<[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]LoginView[/maroon] ID="LoginView1" runat="server"[blue]>[/blue]
            [blue]<[/blue][maroon]LoggedInTemplate[/maroon][blue]>[/blue]
                Logged In.[blue]<[/blue]br [blue]/>[/blue]
                [blue]<[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]LoginStatus[/maroon] ID="LoginStatus1" runat="server" [blue]/>[/blue]
            [blue]</[/blue][maroon]LoggedInTemplate[/maroon][blue]>[/blue]

            [blue]<[/blue][maroon]AnonymousTemplate[/maroon][blue]>[/blue]
                Not Logged In
            [blue]</[/blue][maroon]AnonymousTemplate[/maroon][blue]>[/blue]
        [blue]</[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]LoginView[/maroon][blue]>[/blue]
[blue]</[/blue][maroon]asp[/maroon][blue]:[/blue][maroon]Content[/maroon][blue]>[/blue]

When I run it, it always shows the Logged In template, never the Anonymous template. Pressing Logout has no effect whatsoever. Anyone any ideas about what I could be doing wrong?
 
It could be a problem with your authentication methods and/or roles setup. If you haven't already seen these, a good set od documentation for these controls and methods can be found at:


You may also want to follow this walkthrough article:



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Thanks for the links, very useful. Strangely enough, when I left the computer alone for an hour, the problem seems to have sorted itself out...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top