Bom dia Pessoal!
Então já li alguns artigos referente autenticação com o AD, achei e alterei o seguinte código, porém está dando um erro: The server is not operational
public partial class Teste_AD : System.Web.UI.Page
{
string path = "LDAP://REDECORP.com.br";
string userName = "REDECORP" + @"\" + "77777777";
string password = "55555555";
protected void Page_Load(object sender, EventArgs e)
{
DirectoryEntry adRoot = new DirectoryEntry(path, userName, password);
try
{
Object objnative = adRoot.NativeObject;
Response.Write("Usuario Logado");
}
catch(Exception ex)
{
Response.Write("Usuario não existe no dominio" + ex.Message);
}
}
}
Alguem poderia me ajudar, Vlw