Click here to Skip to main content
14,733,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a an application where users are authenticated using single sign on and enter our system requesting our webpage.
I get/read the http request(to my server) header values(including username and password) in to my application using c#.
Following is the code snippet:
bool bauthenticate =false;
string strSSO = string.Empty;
NameValueCollection headers = base.Request.Headers;
for (int i = 0; i < headers.Count; i++)
            string key = headers.GetKey(i);
            string value = headers.Get(i);
	if (key=="uid")
            strSSO = value.ToString();
            bauthenticate = true;

Problem I am unable to make authentication of user false at logoff time. Please lemme know what I can do to authenticate the user false and redirect to sso login url and enter its credential again to login i.e Logoff the User.

Thanks and Regards in advance.
Squiggs 8-Dec-13 0:23am
Please provide more details. You mention single-sign-on. What is the authentication mechanism? Is this managed by ASP.NET/IIS or a home-grown solution?
lovejeet0707 9-Dec-13 2:51am
Hi Squiggs
Well authentication is being managed by Single Sign On page.
The credentials of SSO is being used to login to application home page.
The Problem I am facing is that when user logoff it is unable to redirect to SSO login page rather it again comes to Application Welcome Page.
Squiggs 9-Dec-13 11:38am
You have not answered my question. What does the Single Sign On page do? Does it call custom authentication code, or does it authenticate using Framework tools? Look at the code for the login page for use of Membership (ex/ Membership.GetUser, Membership.ValidateUser). If you see calls like this, ASP.NET is managing the authentication. In this case, look at the Web.config to determine the type of the MembershipProvider (SqlMembershipProvider, ActiveDirectoryMembershipProvider).
lovejeet0707 11-Dec-13 5:35am
Hi Squiggs
SIngle Sign On Page authenticates user at its own level.Its their own authentication protocols.I am jst navigating users to my application after user logged in through sso login page.

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900