Issue 34 in jayrock: Inheritance security rules violated while overriding member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.

27 views
Skip to first unread message

jay...@googlecode.com

unread,
May 19, 2011, 1:42:46 AM5/19/11
to jayrock...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 34 by haac...@gmail.com: Inheritance security rules violated
while overriding
member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
http://code.google.com/p/jayrock/issues/detail?id=34

Unfortunately, the CAS model changed enough in .NET 4 to break JayRock when
running it in Medium trust. The full stack trace is below.

The System.Runtime.Serialization.IObjectReference interface is marked as
SecurityCritical, so even attempting to implement it violates medium trust.

Full stack trace below.

Inheritance security rules violated while overriding
member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security
accessibility of the method being overriden.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Inheritance security rules
violated while overriding
member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security
accessibility of the method being overriden.

Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the exception
can be identified using the exception stack trace below.

Stack Trace:

[TypeLoadException: Inheritance security rules violated while overriding
member: 'Jayrock.Json.JsonNull.System.Runtime.Serialization.IObjectReference.GetRealObject(System.Runtime.Serialization.StreamingContext)'.
Security accessibility of the overriding method must match the security
accessibility of the method being overriden.]
Jayrock.Json.Conversion.ExportContext.Export(Object value, JsonWriter
writer) +0
Jayrock.Json.Conversion.JsonConvert.Export(Object value, JsonWriter
writer) +31
Jayrock.Json.Conversion.JsonConvert.Export(Object value, TextWriter
writer) +27
Jayrock.JsonRpc.Web.JsonRpcProxyGenerator.Version1(ServiceClass service,
Uri url, IndentedTextWriter writer) +261
Jayrock.JsonRpc.Web.JsonRpcProxyGenerator.WriteProxy(IndentedTextWriter
writer) +502
Jayrock.JsonRpc.Web.JsonRpcProxyGeneratorBase.ProcessRequest() +505
Jayrock.JsonRpc.Web.JsonRpcServiceFeature.ProcessRequest(HttpContext
context) +20
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest() +55
Subtext.Web.Admin.Services.Ajax.AjaxServices.ProcessRequest() +111
Jayrock.JsonRpc.Web.JsonRpcHandler.ProcessRequest(HttpContext context)
+40

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +75


Reply all
Reply to author
Forward
0 new messages