Exemplo n.º 1
0
        public override string GetDN()
        {
            AuthenticationSection authsec = (AuthenticationSection)WebConfigurationManager.GetSection("system.web/authentication");

            if (authsec.Mode != AuthenticationMode.Windows)
            {
                throw new Exception("Windows authentication mode is required!");
            }
            else
            {
                return(LDAP.getDN(formatUser(HttpContext.Current.User.Identity.Name), this.userIdAttribute, this.telephoneAttribute, this.ldapServer, this.authenticationMode, this.ldapUser, this.ldapUserPassword, this.baseOU, this.ldapFilter));
            }
        }