PrepAway - Latest Free Exam Questions & Answers

What should you do?

You are required to dynamically load assemblies into a custom child application domain.
You need to ensure that the assemblies loaded into the child application domain have the same permissions as the applications that are accessed across the local intranet.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the following code to create the child application domain:
Evidence childEvidence = new Evidence(new object [] { SecurityZone.Intranet }, null);
AppDomain.CreateDomain(“ChildDomain”, childEvidence);

B.
Use the following code to create the child application domain:
AppDomain.CreateDomain(“ChildDomain”, SecurityZone.Intranet);

C.
Use the following code to create the child application domain:
AppDomain domain = new AppDomain(“ChildDomain”, SecurityZone.Intranet);

D.
Use the following code to create the child application domain:
Evidence childEvidence = new Evidence (new object [ ] { SecurityZone.Intranet }, null);
AppDomain domain = new AppDomain (“ChildDomain”, childEvidence);

Explanation:
The CreateDomain method of the AppDomain class is an overload method that can be used to create an application domain.
This code creates a child application domain named ChildDomain with the default permissions of applications that are accessed across the local intranet.
Incorrect Answers:
B: You should not use the code that specifies SecurityZone.Intranet as an argument to the CreateDomain method because no such method signature exists. C, D: You should not use the code fragments that instantiate an AppDomain object because the AppDomain class does not have any constructors.

One Comment on “What should you do?


Leave a Reply