none
Framework 4.0 vs 4.5 inconsistencies ? RRS feed

  • Question

  • Hi, I'm calling a remote WCF service to upload a file with MTOM.  The problem I'm encountering is that the call succeeds when I'm using my upload program (WCF Client) on windows 7 with framework v4.0.30319.18444, but when I use the same binaries on a machine with only the 4.0 framework (v4.0.30319.1026), the remote service who also runs 4.5 does not seem to be able to properly deserialize the message (currently trying to get more info about the error from our partner)

    After using fiddler, I have come to the conclusion that there is a difference in the way MTOM xop:Include are serialized in 4.5 vs 4.0 :

    Serialization in 4.5 : 

    <xop:Include href="cid:http://tempuri.org/1/635531341634763623" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>

    Serialization in 4.0 : 

    <xop:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F635531970810109749" xmlns:xop="http://www.w3.org/2004/08/xop/include"/>


    So it looks like the href attribute is urlencoded in 4.0 but not in 4.5 ? Shouldn't framework 4.5 on the server-side be at least compatible with the old 4.0 serialization format ?

    I cannot install v4.5 on my production client machine, because it's Windows Server 2003, so I'm stuck with this framework, and I don't control the service on the other end.

    Is there any way I could overload this encoding behavior  ?

    Thanks in advance !

    Vincent



    • Edited by Demvin Wednesday, December 3, 2014 4:27 PM framework version fix
    Wednesday, December 3, 2014 4:19 PM

Answers