Hi
I am getting a problem in executing the assembly in app domain
ClassLibrary1 is the assembly and i contains the only one method
TestMethod()
In this Testmethod will access the website "www.google.com"
if i call like this its Working fine, but i need to call this through the appdomain.
ClassLibrary1.Class1.TestMethod();
my sample code is:
object[] hEvidence = {new Zone (System.Security.SecurityZone.Internet) };
Evidence AppEvidence = new Evidence(hEvidence, null);
AppDomain d = AppDomain.CreateDomain("ClassLibrary1domain");
d.ExecuteAssemblyByName("ClassLibrary1", AppEvidence);
AppDomain.Unload(d);
Here i am creating the appdomian with only the privileges access to the Internet
i am getting the Error
Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
What it is the problem, where i am going wrong.