|
I'm trying to serialize some stuff for DNA. When I try, I get the following exception:
Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.3300.0 ... ... ...
What's that mean? Do I need to grant the permission somehow? |
| MigrationUser 1 Friday, May 30, 2003 5:25 PM |
For anyone else looking into this, I'll report what I've learned.
It appears the ecosystem enforces "Imperative Code Access Security" on our organism DLLs. There are some things we are not allowed to do. It makes sense of course, to prevent cheating. It makes sense of course, to prevent hacking of my PC by one of the terrarium critters.
I just wish there was a list somewhere. So I'll start one. The following features are prohibited in the terrarium ecosystem: Reflection Serialization Disk Access Registry Access Anyone else care to add any? |
| MigrationUser 1 Monday, January 12, 2004 11:52 PM |
You can check the FAQ, there are some items in there we talk about prohibiting. We do this in several ways, some by turning on CAS features others by walking the IL in your assembly and denying constructs that would otherwise be considered *secure*.
|
| MigrationUser 1 Tuesday, January 13, 2004 1:21 AM |
Right, organism code runs with Execute Only permissions, so items that specifically demand any type of permission will fail. As Justin said, we also walk the IL code to make sure we prevent access to other items that while not necessarily considered a security threat, can be used to cheat, etc. |
| MigrationUser 1 Tuesday, January 13, 2004 1:26 AM |
Yea, I tried to pass a delegate to my child so that I could communicate with it. No luck. ;o) |
| MigrationUser 1 Thursday, January 15, 2004 2:26 PM |
Ah, but that is naughty. Delegates are protected. Think something smaller, that might not be protected and you'll find your communications path. What I'm thinking of you can even pass on the antenna communications and then get an unlimited *canvas* to paint your thoughts on. |
| MigrationUser 1 Thursday, January 15, 2004 4:37 PM |
Oh yeah, I tried delegates too... Forgot to put that on my list.
Static members are banned too. But I imagine we all learned that one quick!
Now Justin wants me to pass a small canvas with my antennae...
|
| MigrationUser 1 Thursday, January 15, 2004 11:49 PM |
Justin,
Have you actually implemented what your thinking of? If you're thinking about an object derived from System.MarshalByRefObject (such as MemoryStream), it won't work. It requires special permission. :o( |
| MigrationUser 1 Saturday, January 17, 2004 11:17 AM |
Nope, and yes, I've implemented this. Don't worry, it'll be locked down next version. |
| MigrationUser 1 Saturday, January 17, 2004 5:10 PM |