Is there a chance to get System.Security.Permissions.ReflectionPermission allowed for .NET 4.0?
I am getting an error when I try using standard .NET classes for JSON serialization.
Here is the stack trace:
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
If I am not mistaken, JodoHost has this permission granted for .NET 2.0 (see http://support.jodohost.com/showthread.php?t=7974&highlight=ReflectionPermission topic). May be it is time to add it to the list of granted permissions for .NET 4.0 too?
I am getting an error when I try using standard .NET classes for JSON serialization.
Here is the stack trace:
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Code:
[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
System.Reflection.Emit.DynamicMethod.PerformSecurityCheck(Module m, StackCrawlMark& stackMark, Boolean skipVisibility) +248
System.Reflection.Emit.DynamicMethod..ctor(String name, Type returnType, Type[] parameterTypes, Module m, Boolean skipVisibility) +49
System.Runtime.Serialization.Json.CriticalHelper.BeginMethod(CodeGenerator ilg, String methodName, Type delegateType, Boolean allowPrivateMemberAccess) +162
System.Runtime.Serialization.Json.CriticalHelper.GenerateClassWriter(ClassDataContract classContract) +144
If I am not mistaken, JodoHost has this permission granted for .NET 2.0 (see http://support.jodohost.com/showthread.php?t=7974&highlight=ReflectionPermission topic). May be it is time to add it to the list of granted permissions for .NET 4.0 too?