[Mono-list] WCF IClientChannel Problems

procke patrick.rocke at gmail.com
Mon Jul 2 16:29:08 UTC 2012


Hi, I'm new to mono but have been asked to look into running an existing .NET
client application of ours using mono for Linux, Android and/or MacOS.

The client uses WCF duplex communication with NetTcpBinding. I've created a
much trimmed down version of the client to try to analyze which of the
fundamentals of the connection to the server will work in mono.

The first problem I had was that a cast to IClientChannel for the
factory.CreateChannel result on the client side was giving an
InvalidCastException. But I managed to get around this by creating a helper
interface that implements the service contract and IClientChannel:
public interface IMySessionChannel : IMySession, IClientChannel {}

... and using this in my ChannelFactory:
_factory = new DuplexChannelFactory<IMySessionChannel>(....)

But I'm still having a bit of a problem. I've added event handlers for the
Closing, Closed and Faulted events of IClientChannel which write a message
to screen on the client side when receiving the events.

Everything works fine on Windows, but when running the client in mono (still
on the windows machine just running the mono command prompt) and shutting
down the server, the events don't seem to come through to the client.

Am I missing something in this? Is there a general issue with IClientChannel
interface in mono? The calls to the server are working as are the callbacks,
but I'm just having some issue with IClientChannel.

--
View this message in context: http://mono.1490590.n4.nabble.com/WCF-IClientChannel-Problems-tp4650281.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list