Friday

authentication in active directory


using System.Security;
public User Login(string login_name, string password){
ICredValidator cv = new LdapCredValidator(); //LanCredValidator();
User u = new User(conn);
if (cv.ValidateCred("MY-DOM", login_name, password))
{
// validation sucess
}else Throw("Login failed for {0}",login_name);
return u;
}

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...