10

are there any tutorials out there on how to create a sandbox using C#?

I would like to personalize my own one, thanks

Sandeep Bansal
  • 6,280
  • 17
  • 84
  • 126

3 Answers3

13

Study up on using AppDomains. Here's some code examples.

statenjason
  • 5,140
  • 1
  • 32
  • 36
  • Thanks a more appropriate answer than the one's above :) – Sandeep Bansal Mar 17 '10 at 19:37
  • 14
    It's shocking how quick SO users are to take jabs at a less than perfect question. Yes, yours is a bit on the vague side. However, discouraging new members with smart remarks does nothing but cast an unnecessary shadow on the community. Sorry you had to deal with that. – statenjason Mar 18 '10 at 00:20
1

We just recently used the MonoSandbox for Security reasons.

I don't know if it works with standard Microsoft's CLR, or if it is specific to the Mono implementation, but I think it works better than just a custom sanbdbox using AppDomains, and since the source code is open you can probably find a way to make it work for you.

The best documentation I have found for the MonoSandbox is here: http://www.mono-project.com/MonoSandbox

aespinoza
  • 196
  • 2
  • 8
0

I would start by looking at Code Access Security.

Matthew Olenik
  • 3,577
  • 1
  • 28
  • 31