What is the easiest way to load up an assembly, instantiate a class from it, but do so in a way that the assembly has limited privileges (sandboxed)? The code should not be able to communicate across the network, write to the file system, or execute processes.
UPDATE I just stumbled upon Assembly.LoadFrom(string assemblyFile, Evidence securityEvidence) Can this be used at all? Not sure I under this evidence thing.
You need to load it in its own AppDomain.
Here is an article describing the entire process.