Question:You create a method that runs by using the credentials of the end user. You need to use Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk. Which code segment should you use? 

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 

+ Answer
+ Report
Total Preview: 883

Copyright © 2024. Powered by Intellect Software Ltd