I have a simple WCF service hosted in a Windows service exe that
accesses an MSSQL database using Castle AR. One of my WCF operations
returns an array of objects that are read from the database, retrieved
using ActiveRecordMediator<type>.FindAll(), where "type" is a stand-
alone class that is decorated with all of the ActiveRecord attributes
([ActiveRecord], [PrimaryKey], [Property], [BelongsTo], etc.), but
does not inherit from ActiveRecordBase or any other classes. The
"type" class is also decorated with [DataContract] and [DataMember]
attributes.

If my WCF operation returns the instances of "type" directly from
ActiveRecordMediator<type>.FindAll(), then they are never received by
the WCF client (connected via a netTcp binding), and the client
connection goes into a faulted state and throws an exception that says
"The remote endpoint no longer recognizes this sequence."

However, if I create new instances of "type" and copy their properties
from the instances retrieved from AR, then return the copies from the
WCF operation, everything works fine and WCF is happy.

Is this an issue that other have dealt with? Is there an easy (or
"correct") way of sending objects retrieved from AR over WCF
connections without having to create copies? Is there a WCF setting I
can tweak to make this work? Any insight would be helpful.

--
Thanks,
Eric Baker

--~--~---------~--~----~------------~-------~--~----~
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