I love the idea of ββusing C # to compile code on demand as the basis for a scripting language. I was wondering how I can process the scripts that I execute so that they cannot access the file system, network, etc. Basically, I want limited permissions to run the script.
The steps that I take:
CompilerResults r = CSharpCodeProvider.CompileAssemblyFromSource(source); Assembly a = r.CompiledAssembly; IScript s = a.CreateInstance(...); s.EntryPoint(...);
Markp source share