Hey guys,

quite many times (always?), when I try to serialize a nhibernate
entity with the JSONReturnBinder, I receive this exception:

Method may only be called on a Type for which Type.IsGenericParameter is true.
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.InvalidOperationException: Method may only
be called on a Type for which Type.IsGenericParameter is true.

Source Error:

Line 36:
Line 37:                        StringWriter writer = new StringWriter();
Line 38:                        serializer.Serialize(writer, target);
Line 39:
Line 40:                        return writer.GetStringBuilder().ToString();


Source File: 
c:\data\castle\MonoRail\Castle.MonoRail.Framework\Services\NewtonsoftJSONSerializer.cs
   Line: 38

I can come around this by converting my nhibernate entities into
anonymous objects, most of the time, but it would help me, if I
understood, exactly what caused the exception. Anyone has got this
insight?

-- 
Jan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to