GithubHelp home page GithubHelp logo

echo's Introduction

Echo

This simple WCF example demonstrate an error that occurs in Mono on macOS.

Overview

If a WCF server, running on Windows, throws a FaultException that contains a FaultCode to a WCF client, running on macOS, the following CommunicationException is caught, not the expected FaultException.

{System.ServiceModel.CommunicationException: Received an invalid SOAP Fault message ---
> System.Xml.XmlException: Content cannot be converted to the type
System.Xml.XmlQualifiedName. Line 1, position 78. ---> System.FormatException: The ':'
character, hexadecimal value 0x3A, cannot be included in a name.

Note, if the same WCF server throws a FaultException without a FaultCode, the same WCF client will catch the FaultException as expected.

I've tested this with:

  • Microsoft Visual Studio for Mac (Community) - Version 8.0.3 (build 14)
  • Mono Framework MDK - 5.16.0.220, and Mono 5.18.1.3, (64-bit)

and:

  • Microsoft Visual Studio for Mac (Community) - Version 8.0.4 (build 0)
  • Mono Framework MDK - 5.18.1.3, and Mono 5.20.1.19, (64-bit)

Note, this worked in (much) earlier versions of Mono. I've tested against Version 4.0.2.

Also note, this error does not occur on Windows.

Details

To demonstrate the error:

  1. Clone the repository on both Windows and macOS.

  2. Build a Release build of the solution on Windows and then run EchoServer.exe. Note, you might need to open TCP Port 80 for incoming traffic in the Windows Firewall.

  3. Build a Debug build of the solution on macOS and then debug the EchoClient project. This is a console utility that sends a simple string to EchoServer.

  4. For easy debugging, add the host name or IP address of the system running EchoServer in the project's run arguments (EchoClient > Option > Default > Arguments).

Notes

If you look at the EchoService service contract, you'll see two two Echo methods: one that throws a FaultException and one that throws a FaultException with a FaultCode.

The code in EchoClient calls each of these functions, once with valid input and one without, so as to trigger a FaultException.

echo's People

Contributors

dalefugier avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.