Hi all, I've been having a problem with serializing DynamicProxy IInvocation instances. The background is: We've been using service buses for a recent project and are enjoying the functionality provided by such frameworks, however we're looking at implementing RPC-like functionality for some of the front-end parts. Rather than using an RPC framework (like WCF) as a service bus, we'd rather primarily use a service bus, and implement RPC functionality by wrapping proxy invocations in service bus messages (sagas for bidirectional calls etc). We are also going to enforce that all interface methods be async (or maybe Rx types) eg return Tasks<>.
The problem I've got is when I try to serialize a DynamicProxy IInvocation. Stepping through Castle.Core the GetObjectData method in AbstractInvocation is being called, which instantiates a RemoteInvocation type. The GetObjectData method is then called on the RemoteInvocation instance, which then instantiates another RemoteInvocation, causing an infinite loop. The process eventually exceptions with an out of memory exception. Question 1: Am I doing something conceptually wrong by trying to implement RPC functionality in front of a service bus. Question 2: Is the issue I'm having with DynamicProxy a bug, or am I using it in an unexpected way? I didn't find any tests on serializing an IInvocation although the presence of the GetObjectData method (in ISerializable) suggests that this was thought of. An undesirable fix would be to make a custom message from the IInvocation instance to send over the wire. Thoughts appreciated. Cheers, Rob -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-users+unsubscr...@googlegroups.com. To post to this group, send email to castle-project-users@googlegroups.com. Visit this group at http://groups.google.com/group/castle-project-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.