Question:Which of the following code samples runs an assembly as if it were located on the Internet? (Choose all that apply.)
 

A Dim hostEvidence As Object() = {New Zone (SecurityZone.Internet)}
Dim e As Evidence = New Evidence (hostEvidence, Nothing)
Dim d As AppDomain = AppDomain.CreateDomain("MyDomain", e)
d.ExecuteAssembly("Assembly.exe") 

B Dim hostEvidence As Object() = {New Zone (SecurityZone.Internet)}
Dim d As AppDomain = AppDomain.CreateDomain("MyDomain")
Dim e As Evidence = New Evidence (hostEvidence, Nothing)
d.Evidence = e
d.ExecuteAssembly("Assembly.exe") 

C Dim myDomain As AppDomain = AppDomain.CreateDomain("MyDomain")
myDomain.ExecuteAssembly("Assembly.exe", New Zone (SecurityZone.Internet)) 

D Dim e As Evidence = New Evidence
e.AddHost(New Zone (SecurityZone.Internet))
Dim myDomain As AppDomain = AppDomain.CreateDomain("MyDomain")
myDomain.ExecuteAssembly("Assembly.exe", e) 

+ Answer
+ Report
Total Preview: 1266

Copyright © 2024. Powered by Intellect Software Ltd