Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.1
|
BOOK: Beginning ASP.NET 1.1
This is the forum to discuss the Wrox book Beginning ASP.NET 1.1 with Visual C#.NET 2003 by Chris Ullman, John Kauffman, Chris Hart, Dave Sussman, Daniel Maharry; ISBN: 9780764557088
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2004, 06:02 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to sign out with Window Auth Identity

Hello
i know that when you use Forms Authenticate you use":

Private Sub SignOut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

            FormsAuthentication.SignOut()
            Response.Redirect("/")
End Sub

When I use Context.User.Identity.IsAuthenticated is there a Method to Signout easily like FormsAuthentication.SignOut().

If not how should I do this??

 
Old November 4th, 2005, 07:39 PM
Registered User
 
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I had the same problem so I added the following to the SiteHeader.ascx page to solve it:

private void InitializeComponent()
{
  this.SignOut.Click += new EventHandler(SignOut_Click);
  this.Load += new System.EventHandler(this.Page_Load);
  }

private void SignOut_Click(object sender, EventArgs e)
{
  FormsAuthentication.SignOut();
  Context.Session.Clear();
  Response.Redirect( "/Default.aspx" );
}

Plus SignOut.Visible = true; to within the if (Context.User.Identity.IsAuthenticated) of the Page_Load method.

I hope this helps.

Cheers,

JD





Similar Threads
Thread Thread Starter Forum Replies Last Post
Auth challenge accessing server via alias - 2003 cnadams Windows Server 0 March 1st, 2007 09:06 PM
Forms Auth and Roles ~Bean~ ASP.NET 2.0 Professional 1 August 22nd, 2006 11:35 AM
Dynamically changing Master Pages (Forms Auth) lancer ASP.NET 2.0 Basics 3 July 16th, 2006 10:59 PM
How to connect Win NT Auth to ASP? p0220507 Classic ASP Databases 4 December 29th, 2004 08:36 AM
IIS request windows auth from outside access planoie ASP.NET 1.0 and 1.1 Professional 1 June 5th, 2004 04:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.