A Dim objUser As WindowsPrincipal = _
DirectCast(Thread.CurrentPrincipal, WindowsPrincipal) Dim blnAuth As Boolean = _ objUser.IsInRole(Environment.MachineName)
B Dim objUser As WindowsPrincipal = _
DirectCast(Thread.CurrentPrincipal, WindowsPrincipal) Dim blnAuth As Boolean = objUser.IsInRole ("Clerk")
C Dim objUser As GenericPrincipal = _
DirectCast(Thread.CurrentPrincipal, GenericPrincipal) Dim blnAuth As Boolean = objUser.IsInRole
("Clerk")
D Dim objUser As WindowsIdentity = WindowsIdentity.GetCurrent For Each objGroup As
IdentityReference In objUser.Groups "A Composite Solution With Just One Click" - Certification
Guaranteed 154 Microsoft 70-536 Exam
Dim objNT As NTAccount = _
DirectCast(objGroup.Translate( _
Type.GetType("NTAccount")), NTAccount)
Dim blnAuth As Boolean = objNT.Value.Equals( _
Environment.MachineName & "\Clerk")
If blnAuth Then Exit ForNext