我找到了这个代码,但它适用于.Net 3.5 +
' set up domain context
Dim ctx As New PrincipalContext(ContextType.Domain)
' find a user
Dim user As UserPrincipal = UserPrincipal.FindByIdentity(ctx, "SomeUserName")
If user IsNot Nothing Then
' user exists - do something here....
Else
' user does not exist - do something else....
End If
有没有可以在.Net 2.0中使用的替代方案?