Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI

I Have my application hosted in GoDaddy Hosting Server.

Right now I have a requirement for checking the user through windows authentication and if the user is present in the DB then i am checkig the permissions and redirecting to the dashboard
accordingly..

This is to bypass Login page to the users who are in the Application...

Below is the Code which I'm using for catching the Username through Windows Authentication..

C#
WindowsIdentity user = (WindowsIdentity)HttpContext.Current.User.Identity;
            string userName = user.Name;
            if (!string.IsNullOrEmpty(userName))
            {
                string userDomain = userName.Substring(0, userName.IndexOf(@"\")).ToLower();
                userAlias = userName.Substring(userName.IndexOf(@"\") + 1).ToLower();
            }



Here in UserAlias I'm catching the username.

Everything Worked in my Intranet Server while Hosting.

But when we are hosting the Application in Hosting Server, then we are getting Godaddy Directory User..

So Is there any way so that I can check my Company Directory for checking the users to Bypassinng the Login...

Please Guide me on this
Posted
Updated 18-Jun-14 20:36pm
v2

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