WCF: using NetDataContractSerializer with duplex channels

J

Jimmy

Hello,

I have a scenario where I have one or more publishers, a broadcaster and one
or more subscribers. The publishers publish information to the broadcaster,
which then broadcasts that information to all subscribers. Subscribers use
callbacks to receive information from the broadcaster.


I'm in the process of switching to NetDataContractSerializer, and that seems
to work fine for communication from publishers to the broadcaster (meaning,
when I step through the broadcaster receiving the information, the
information is deserialized properly). However, for communication using the
callback channel, from the broadcaster to the subscribers, I get a strange
behavior. The subscribers to get the event. However, but the class is not
deserialized properly; I just get a null. There is no exception or error in
the svclog, Since there is no error outputted anywhere, I'm not sure how to
diagnose this.


I'm using the approach in
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3282261&SiteID=1 to
make sure the NetDataContractSerializer is set properly. Again, that works
fine for communication from the publishers to the broadcaster, so I don't
think that's the issue. Any tips on how to use NetDataContractSerializer with
callback channels, or how to diagnose this would be appreciated.



Thanks!
 
J

Jimmy

I got it to work with callback channels, IF one does not add a handler to the
client's InnerChannel.Faulted event. I've tried only adding and removing the
handler for that event, and having the handler there causes the null behavior
I described above...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top