INTRODUCTION
Windows Communication Foundation (WCF) does not have the functionality to send secured messages and then receive unsecured responses, or to send unsecured messages and receive secured responses. The hotfix that is described in this article adds a new enableUnsecuredResponse attribute. The default value of the enableUnsecuredResponse attribute is false. If you set the value of this attribute to true, the following new features are enabled in WCF:
-
WCF clients can accept unsecured responses even if the outgoing messages are secured by using the Secure Socket Layer (SSL) protocol to sign the message body.
-
WCF services can send unsecured responses that have no security header in SOAP envelopes even if the request is secured.
Note The enableUnsecuredResponse attribute only applies only to the CustomBinding type.
Resolution
If you are using the .NET Framework 3.0, install the hotfix that is described in the following Microsoft Knowledge Based article:
967105 FIX: A hotfix that enables WCF to send secured messages and receive unsecured responses, and to send unsecured messages and receive secured responses, is available for the .NET Framework 3.0If you are using the .NET Framework 3.5 Service Pack 1 on Windows 7 or Windows Server 2008 R2, install the hotfix that is described in the following Microsoft Knowledge Based article:
977420 A hotfix rollup is available to fix problems in Windows Communication Foundation in the .NET Framework 3.5 SP1 for Windows 7 and for Windows Server 2008 R2 If you are using the .NET Framework 3.5 Service Pack 1 on other operating systems, install the following hotfix to resolve the problem. 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 service pack 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 Web site:
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 3.5 Service Pack 1.
Restart requirement
You do not have to restart the computer after you apply this hotfix if no instance of the .NET Framework is being used.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
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.
File information for all x86-based versions of Windows Server 2003 and of Windows XP
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
Servicemonikersupport.dll |
3.0.4506.4119 |
17,240 |
01-Jun- 2009 |
22:56 |
x86 |
System.runtime.serialization.dll |
3.0.4506.4119 |
970,752 |
01-Jun- 2009 |
22:56 |
x86 |
System.servicemodel.dll |
3.0.4506.4119 |
5,931,008 |
01-Jun- 2009 |
22:56 |
x86 |
File information for all x64-based versions of Windows Server 2003 and of Windows XP
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
Servicemonikersupport.dll |
3.0.4506.4119 |
19,304 |
01-Jun- 2009 |
22:28 |
x64 |
System.runtime.serialization.dll |
3.0.4506.4119 |
847,872 |
01-Jun- 2009 |
22:28 |
x64 |
System.servicemodel.dll |
3.0.4506.4119 |
5,267,456 |
01-Jun- 2009 |
22:28 |
x64 |
File information for all x86-based versions of Windows Vista SP2 and of Windows Server 2008 SP2
File name |
File version |
File size |
Date |
Time |
---|---|---|---|---|
Servicemonikersupport.dll |
3.0.4506.4120 |
17,240 |
10-Jun-2009 |
06:55 |
System.runtime.serialization.dll |
3.0.4506.4120 |
970,752 |
10-Jun-2009 |
06:55 |
System.servicemodel.dll |
3.0.4506.4120 |
5,935,104 |
10-Jun-2009 |
06:55 |
File information for all x64-based versions of Windows Vista SP2 and of Windows Server 2008 SP2
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
Servicemonikersupport.dll |
3.0.4506.4120 |
19,288 |
10-Jun-2009 |
06:56 |
x64 |
System.runtime.serialization.dll |
3.0.4506.4120 |
847,872 |
10-Jun-2009 |
06:56 |
x64 |
System.servicemodel.dll |
3.0.4506.4120 |
5,271,552 |
10-Jun-2009 |
06:56 |
x64 |
File information for all Itanium-based versions of Windows Server 2008 SP2
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
Servicemonikersupport.dll |
3.0.4506.4120 |
33,640 |
10-Jun-2009 |
06:56 |
IA-64 |
System.runtime.serialization.dll |
3.0.4506.4120 |
847,872 |
10-Jun-2009 |
06:56 |
IA-64 |
System.servicemodel.dll |
3.0.4506.4120 |
5,271,552 |
10-Jun-2009 |
06:56 |
IA-64 |
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
More Information
Use the following example code to test the enableUnsecuredResponse attribute:
ServiceBindingElementCollection serviceBec = new BindingElementCollection();
SecurityBindingElement serviceSbe = SecurityBindingElement.CreateUserNameForCertificateBindingElement(); serviceSbe.EnableUnsecuredResponse = true; serviceBec.Add(serviceSbe); serviceBec.Add(new TextMessageEncodingBindingElement()); serviceBec.Add(new HttpTransportBindingElement()); Binding serviceBinding = new CustomBinding(serviceBec); ServiceHost serviceHost = new ServiceHost(typeof(RequestReply)); … serviceHost.Open();
Client
BindingElementCollection clientBec = new BindingElementCollection();
SecurityBindingElement clientSbe = SecurityBindingElement.CreateUserNameForCertificateBindingElement(); clientSbe.EnableUnsecuredResponse = true; clientBec.Add(clientSbe); clientBec.Add(new TextMessageEncodingBindingElement()); clientBec.Add(new HttpTransportBindingElement()); Binding clientBinding = new CustomBinding(clientBec); IRequestReply channel = cf.CreateChannel(); try { channel.SendString("Hello"); cf.Close(); }