Restrict plugin access to file system and network via appdomain

后端 未结 3 1309
耶瑟儿~
耶瑟儿~ 2020-12-01 13:34

I asked a while ago how to restrict plugins access ( I want to prevent them from writing to the disk or network ) and i was told to use AppDomain. I have searched and tried

3条回答
  •  时光取名叫无心
    2020-12-01 13:47

    If you're using plugins, you might perhaps know about proxies.

    While loading your assembly through a proxy, you can specify the security policy level for this particular assembly through the LoadAssembly() method or so, if I remember correctly. In other words, this is done through reflection.

    I know my answer isn't that much detailed, but I hope it will give you an idea of where to look for your solution. I shall take an eye out to find further details on the subject so that I may be of better help. =)

    Hope you will share your findings when you've done it.

提交回复
热议问题