13

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.

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

1 Answers1

12

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.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • Oh. Duh. I was so bent on doing an IronPython-specific solution that it never occurred to me to search for a general solution. I are dumb. –  Dec 08 '10 at 23:07
  • 11
    You are not dumb, you are learning, I wish more people were learning... anyway your question related to a problem I had so by asking here, you have not just helped yourself but me as well and probably others, thank you :) – TimothyP Feb 02 '11 at 00:43