You must Sign In to post a response.
  • Category: ASP.NET

    Hoe to do intranet Single sign on with Active directory(OR LDAP) through kerboroes authentication

    I am on Active directory .I want to do Intranet Single sign with Active directory through kerboroes authentication .At the same time, for external users have to provide Log in Form and Once given LDAP credentials have to validate with Active Directory.
  • #767233
    HI,
    Please try this code once you get the user name and pwd of user from Log in Form:

    using System.DirectoryServices;

    public static string IsUserValid()
    {
    string szReturnMsg="";
    try
    {
    LdapConnection ldp = new LdapConnection
    (new LdapDirectoryIdentifier((string)null, false, false));
    NetworkCredential userInfo = new NetworkCredential(Environment.UserName,
    "UserPassword", Environment.UserDomainName);
    ldp.Credential = userInfo;
    ldp.AuthType = AuthType.Negotiate;
    ldp.Bind(userInfo);
    szReturnMsg="User Successfully validated!"
    }
    catch (LdapException ex)
    {
    szReturnMsg = ex.Message();
    }
    return szReturnMsg;
    }


    Please find some of the details and source code:
    http://www.dotnetgallery.com/kb/resource6-Login-authentication-using-LDAP-Active-Directory-for-ASPNET-applications.aspx


  • Sign In to post your comments