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
URL:
Depends on:
Blocks:
 
Reported: 2011-12-16 23:56 UTC by Cetin Sert
Modified: 2011-12-17 00:05 UTC (History)
1 user (show)

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


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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 2554 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

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.