public string CheckDomainUser(string uid, string pwd)
{
string flag1 = "false";
try
{
if (pwd == null || pwd.Trim().Length == 0)
{
return flag1;
}
string sPath = " LDAP://shanghai-air.com";
DirectoryEntry entry1 = new DirectoryEntry(sPath, uid, pwd, AuthenticationTypes.ServerBind);
object obj1 = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(entry1.NativeObject);
flag1 = "true";
}
catch
{
flag1 = "false";
}
return flag1;
}
{
string flag1 = "false";
try
{
if (pwd == null || pwd.Trim().Length == 0)
{
return flag1;
}
string sPath = " LDAP://shanghai-air.com";
DirectoryEntry entry1 = new DirectoryEntry(sPath, uid, pwd, AuthenticationTypes.ServerBind);
object obj1 = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(entry1.NativeObject);
flag1 = "true";
}
catch
{
flag1 = "false";
}
return flag1;
}