I got a program that compile c# script and run them as plugins. And i want to block any possibile damages from plugins so at building time i add to each plugin class the IO permission to read and to write only in his path Somthing like this:
[FileIOPermission(SecurityAction.PermitOnly, Write="<pluginpath>", Read="<pluginpath>")]
class EmptyClass
{}
And it works ! But it also block any net activity of the plugin like open a socket or an httplistener (the error message is a System.net.WebPermission violated)
Any solution ?