Bug 2554 - Mono cannot serialize IPEndPoint objects in WCF duplex communication callbacks.
Summary: Mono cannot serialize IPEndPoint objects in WCF duplex communication callbacks.
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: 2.10.x
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-12-16 23:56 UTC by Cetin Sert
Modified: 2011-12-17 00:05 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:

error log from my application (5.18 KB, text/plain)
2011-12-16 23:56 UTC, Cetin Sert

Description Cetin Sert 2011-12-16 23:56:03 UTC
Created attachment 1066 [details]
error log from my application

A distributed reverse proxy application I am developing ([PortFusion](http://portfusion.sourceforge.net)) has the following network API:

    namespace API
        public interface IConnectionHostCallback
            [OperationContract(IsOneWay = true)]    void Relay              (int serverPort, IPEndPoint client, byte[] message);
            [OperationContract(IsOneWay = true)]    void DisconnectAtClient (int serverPort, IPEndPoint client);

        [ServiceContract(CallbackContract = typeof(IConnectionHostCallback), SessionMode = SessionMode.Required)]
        public interface IConnectionHost
            [OperationContract]                     bool OpenTunnel         (int serverPort);
            [OperationContract]                     bool CloseTunnel        (int serverPort);
            [OperationContract]                     int  Reply              (int serverPort, IPEndPoint client, byte[] reply);
            [OperationContract]                     bool DisconnectAtHost   (int serverPort, IPEndPoint client);

When I run the client application with Mono and it receives from host a *callback* **Relay(int, IPEndPoint, byte[])**, the **IPEndPoint** object is always uninitialized. (The client can send IPEndPoints to host without any problem.)

As this issue is mono-only and the network API has proven quite stable otherwise, I would like to know whether there is a workaround for this.

My questions:

 1. Has anyone had the same or a similar serialization issue with Mono WCF and solved it?
 2. Does anyone know how I could implement a mono-only serialization logic for WCF to use without changing the API otherwise?

Any suggestions, hints, links to reading material are also most welcome.

Info on my client-side app.: .NET 4.0 / C#, WCF configuration is handled purely in code, no svcutil generated classes are used (with or without svcutil mono behaves the same), tested with Mono 2.10.6.
Comment 1 Cetin Sert 2011-12-17 00:05:04 UTC
The application uses NetTcpBinding.

Note You need to log in before you can comment on or make changes to this bug.