阅读背景:

隔离特定线程以在中等信任中运行

来源:互联网 

I'm writing a .net win app that loads foreign assemblies and executes third party scripts. I am looking for a way to sanitize the code executed by the foreign script, and only allow the third party scripts access to a defined set of websites. Creating a PermissionSet with its state set to none, and then adding the desired websites, and selecting "Permit only", would seem to do the trick, if it wasn't for the fact that the third party code can, under full trust, revert this by using Assert. Still I want the part of the code that I control myself to run under full trust, so I am looking for a way to restrict the trust level for a particular thread, or at a particular point in the stack, programmatically.I'm writing a .net win app that loads foreign a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: