Question:
You are creating a new security policy for an application domain. You write the following lines of code.
Dim objPolicy As PolicyLevel = PolicyLevel.CreateAppDomainLevel
Dim noTrustStatement As New PolicyStatement( _
objPolicy.GetNamedPermissionSet("Nothing"))
Dim fullTrustStatement As New PolicyStatement( _
objPolicy.GetNamedPermissionSet("FullTrust"))
You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set.
Which code segment should you use?
A Dim objGroup As CodeGroup = New UnionCodeGroup( _
New ZoneMembershipCondition(SecurityZone.Trusted), _ fullTrustStatement)B Dim objGroup1 As CodeGroup = New FirstMatchCodeGroup( _ New AllMembershipCondition, noTrustStatement)
Dim objGroup2 As CodeGroup = New UnionCodeGroup( _
New ZoneMembershipCondition(SecurityZone.Trusted), _ fullTrustStatement)C Dim objGroup As CodeGroup = New FirstMatchCodeGroup( _ New ZoneMembershipCondition (SecurityZone.Trusted), _ fullTrustStatement)
D Dim objGroup1 As CodeGroup = New FirstMatchCodeGroup( _ New ZoneMembershipCondition (SecurityZone.Trusted), _ fullTrustStatement)
"A Composite Solution With Just One Click" - Certification Guaranteed 190 Microsoft 70-536 Exam Dim objGroup2 As CodeGroup = New UnionCodeGroup( _
New AllMembershipCondition,noTrustStatement)
+ AnswerB
+ Report