Symptoms

Consider the following scenario:

  • You have a Microsoft .NET Framework 4.0-based Windows Communication Foundation (WCF) client and a non-WCF server.

  • You use Message Transmission Optimization Mechanism (MTOM) to transfer a binary attachment from the WCF client to the non-WCF server.

  • The WCF client calls the web service to transfer the attachment to the non-WCF server.

In this scenario, the non-WCF server cannot receive the attachment that is transferred by the WCF client.Note This issue also occurs in versions of the .NET Framework that are earlier than the .NET Framework 4.0. If you experience this issue, we recommend that you upgrade to the .NET Framework 4.0 and apply this hotfix.

Cause

This issue occurs because WCF explicitly encodes the reference of Content-ID in the SOAP message. Therefore, the non-WCF SOAP server cannot decode the MTOM SOAP message.For example, a Content-ID is supposed to be as follows:

cid:http://tempuri.org/1/634563669178943940

However, WCF sends the following Content-ID instead:

cid:http%3A%2F%2Ftempuri.org%2F1%2F634563669178943940

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have the .NET Framework 4.0 installed.

Restart requirement

You must restart the computer after you apply this hotfix if the affected files are being used. We recommend that you close all .NET Framework applications before you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

For all supported x86-based versions for Windows XP, Windows 2003, Windows Vista, Windows Server 2008, and Windows 7

File name

File version

File size

Date

Time

Platform

System.runtime.serialization.dll

4.0.30319.554

1,039,160

03-Feb-2012

08:25

x86

For all supported x64-based versions for Windows XP, Windows 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

System.runtime.serialization.dll

4.0.30319.554

1,039,160

03-Feb-2012

08:25

x86

For all supported IA-64-basedversions for Windows XP, Windows 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

System.runtime.serialization.dll

4.0.30319.554

1,039,160

03-Feb-2012

08:25

x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

For more information about how to configure MTOM in WCF, visit the following MSDN website:

General information about how to configure MTOM in WCF

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.