c#如何验证不同域中的Windows凭据

时间:2017-02-21 09:38:15

标签: c# windows-authentication

有没有办法验证某个域中的Windows凭据?我只拥有用户的Windows凭据;

using(PrincipalContext pc = new PrincipalContext(ContextType.Domain, "SOME DOMAIN"))
{
   // validate the credentials
   bool isValid = pc.ValidateCredentials("myuser", "mypassword");
}

当我有密码时,我使用了以下代码;

# Returns the names of attributes that are journalized when updating the meeting
def journalized_attribute_names
  names = Meeting.column_names - %w(id created_on updated_on)
  names
end

0 个答案:

没有答案