You are loading a new assembly into an application.

You are loading a new assembly into an application. You need to override the default evidence
for the assembly. You require the common language runtime (CLR) to grant the assembly a
permission set, as if the assembly were loaded from the local intranet zone.
You need to build the evidence collection. Which code segment should you use?

A. Dim objEvidence As New Evidence( _
    Assembly.GetExecutingAssembly.Evidence
B. Dim objEvidence As New EvidenceobjEvidence.AddAssembly( _
    New Zone(SecurityZone.Intranet))
C. Dim objEvidence As New EvidenceobjEvidence.AddHost( _
    New Zone(SecurityZone.Intranet))
D. Dim objEvidence As New Evidence( _
    AppDomain.CurrentDomain.Evidence)


Answer: C

No comments:

Post a Comment