You are creating a Windows application by using the .NET Framework 3.5.
The application will be used by the shipping department of your company. The application contains a form
named SchedulingForm.
You plan to design a strategy to ensure the following accessibility criteria:
SchedulingForm is accessible only to users logged on by using a particular Windows account.
The Windows account belongs to a local group named Managers.
You need to implement the strategy by using the minimum amount of development effort.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.
Create custom components that implement the IIdentity and IPrincipal classes.
B.
Call the AppDomain.CurrentDomain.SetPrincipalPolicy method that has the PrincipalPolicy
enumeration value set to WindowsPrincipal.
C.
Create a GenericIdentity object that has the current user and the role membership information. Attach
the object to the current thread.
D.
Create a custom component that implements the IIdentity class that has the current user and role
membership information. Attach the component to the current thread.
E.
Use the Thread.CurrentPrincipal.IsInRole method to test the role membership. If the user does not
belong to the Managers group, hide access to SchedulingForm.