沙盒IronPython? [英] Sandbox IronPython?

查看:154
本文介绍了沙盒IronPython?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在.Net应用程序中但在沙箱中运行IronPython解释器?我想拒绝对文件系统的IP脚本访问,同时仍然允许应用程序本身访问.

Is it possible to run an IronPython interpreter inside my .Net application, but inside a sandbox? I want to deny the IP script access to the filesystem while still allowing the app itself access.

这是否涉及在第二个AppDomain中运行脚本引擎?我该如何将其戴上手铐,使其无法做自己喜欢的事?

Would this involve running the scripting engine in a second AppDomain? How would I handcuff it so it can't do whatever it pleases?

推荐答案

下面是一篇文章,介绍了如何创建一个AppDomain并在沙箱中执行代码.只需创建AppDomain并将其中运行的代码戴上手铐即可.

Here's an article explaining how to create an AppDomain and execute code in a sandbox. Just create the AppDomain and handcuff the code that runs inside it.

这篇关于沙盒IronPython?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆