문제

I'm trying the last time when my windows password was written incorrect. And to do it I use UserPrincipalSearcher:

PrincipalContext pc = new PrincipalContext(ContextType.Machine);
var v = UserPrincipal.FindByBadPasswordAttempt(pc, DateTime.Now, MatchType.LessThan);

But I get NotSupported exception in the second line of code. What is the problem?

올바른 솔루션이 없습니다

다른 팁

The method expects a date in UTC format. Although not noted in the help files, I would imagine that a wrong date format can be a reason for this exception.

Try to pass DateTime.UtcNow instead of just DateTime.Now.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top