using System; using System.Threading; using System.Security; using System.Security.Policy; public class Hello { static public Evidence e; public static void Main() { Zone z=new Zone(SecurityZone.Intranet); object [] hostevidence={z}; e=new Evidence( hostevidence, null); Thread t1=new Thread(new ThreadStart(StartDomain)); t1.IsBackground=true; t1.Name="AD 1"; t1.Start(); Thread.Sleep(1000); Thread t2=new Thread(new ThreadStart(StartDomain)); t2.IsBackground=true; t2.Name="AD 2"; t2.Start(); Console.WriteLine("Press to exit"); Console.ReadLine(); } public static void StartDomain() { AppDomain appHello = AppDomain.CreateDomain( Thread.CurrentThread.Name); appHello.ExecuteAssembly("Hello.exe"); appHello.ExecuteAssembly("Hello.exe", e); } }