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.0

Article translations Article translations
Article ID: 967105 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

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 to the CustomBinding type.

Resolution

If you are using .NET Framework 3.5 Service Pack 1, install the hotfix that is described in KB971493 to resolve the problem. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
971493 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.5 SP1


If you are using .NET Framework 3.0, install the hotfix that is described in this article 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=support
Note 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

You must have .NET Framework 3.0 installed on Windows Server 2003 or Windows XP.

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.
x86 version for Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.runtime.serialization.dll3.0.4506.64884,73612-May- 200922:42x86
System.servicemodel.dll3.0.4506.645,623,80812-May- 200922:42x86
x64 version for Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.runtime.serialization.dll3.0.4506.64884,73612-May- 200922:38x64
System.servicemodel.dll3.0.4506.645,623,80812-May- 200922:38x64

Status

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

More information

The example code to realize the functions:

Service
BindingElementCollection 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();
}

Properties

Article ID: 967105 - Last Review: October 25, 2013 - Revision: 2.0
Applies to
  • Microsoft .NET Framework 3.0
Keywords: 
kbnosurvey kbarchive kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB967105

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com