Click here to Skip to main content
15,881,812 members
Articles / Web Development / ASP.NET

Single Sign On (SSO) for cross-domain ASP.NET applications: Part-II - The implementation

Rate me:
Please Sign up or sign in to vote.
4.93/5 (118 votes)
4 Oct 2010CPOL24 min read 556.2K   18.2K   254  
Implementation approach of a domain independent Single Sign On (SSO) for ASP.NET applications.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using SSOLib;

public partial class _Profile : PrivatePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (CurrentUser != null)
        {
            lblUser.Text = string.Format("'{0} {1}'", CurrentUser.FirstName, CurrentUser.LastName);
            lblServer.Text = Request.Url.Host;
            lblFirstName.Text = CurrentUser.FirstName;
            lblLastName.Text = CurrentUser.LastName;
            lblUserName.Text = CurrentUser.UserName;
        }
    }

    protected void lnkLogout_Click(object sender, EventArgs e)
    {
        Logout();
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder SmartAspects
Bangladesh Bangladesh
I write codes to make life easier, and that pretty much describes me.

Comments and Discussions