FIX: A System.NotSupportedException exception is thrown when you run an IIS hosted WCF service that uses a client certificate for SSL authentication

Article translations Article translations
Article ID: 972251 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You create a Windows Communication Foundation (WCF) service that is hosted in Internet Information Services (IIS).
  • You use the WebScriptEnablingBehavior class in the WCF service.
  • You configure the WCF service to use a client certificate for Secure Sockets Layer (SSL) authentication. To do this, you set the ClientCredentialType property in the Web.config file to Certificate.
In this scenario, when you run the WCF service, a System.NotSupportedException exception is thrown and you receive an error message that resembles the following:
The SSL settings for the service 'None' does not match those of the IIS 'Ssl, SslNegotiateCert, SslRequireCert, SslMapCert, Ssl128'.

CAUSE

This problem occurs because some properties of the HttpTransportBindingElement instance are not copied to the auto-generated javascript proxy endpoints.

RESOLUTION

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, 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 the .NET Framework 3.5 Service Pack 1 (SP1) installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you install the hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes. 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-based version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.servicemodel.web.dll3.5.594.4152569,34422-Jul-200901:51x86

x64-based version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.servicemodel.web.dll3.5.594.4152491,52022-Jul-200902:13x64

Itanium-based version for Windows Server 2000, Windows Server 2003 and Windows XP
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.servicemodel.web.dll3.5.594.4152491,52022-Jul-200902:26IA-64

STATUS

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

WORKAROUND

To work around this problem, self-host the WCF service instead of hosting the service in IIS.

MORE INFORMATION

Stack dump information

System.ServiceModel.dll!System.ServiceModel.Channels.HttpsChannelListener.ApplyHostedContext(System.ServiceModel.Activation.VirtualPathExtension virtualPathExtension, bool isMetadataListener) + 0x1b7 bytes    

System.ServiceModel.dll!System.ServiceModel.Channels.HttpsTransportBindingElement.BuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x69 bytes    

  System.ServiceModel.dll!System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener<System.__Canon>() + 0x5f bytes       

System.ServiceModel.dll!System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x66 bytes    

System.ServiceModel.Web.dll!System.ServiceModel.Channels.WebScriptMetadataMessageEncodingBindingElement.BuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x4b bytes    

  System.ServiceModel.dll!System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener<System.__Canon>() + 0x5f bytes       

        System.ServiceModel.dll!System.ServiceModel.Channels.Binding.BuildChannelListener<System.__Canon>(System.Uri listenUriBaseAddress, string listenUriRelativeAddress, System.ServiceModel.Description.ListenUriMode listenUriMode, System.ServiceModel.Channels.BindingParameterCollection parameters) + 0xa6 bytes 

        System.ServiceModel.dll!System.ServiceModel.Channels.Binding.BuildChannelListener<System.__Canon>(System.Uri listenUriBaseAddress, System.ServiceModel.Channels.BindingParameterCollection parameters) + 0x7c bytes    

System.ServiceModel.Web.dll!System.ServiceModel.Description.WebScriptEnablingBehavior.AddMetadataEndpoint(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher, bool debugMode) + 0x698 bytes 

System.ServiceModel.Web.dll!System.ServiceModel.Description.WebScriptEnablingBehavior.ApplyDispatchBehavior(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher) + 0x60 bytes

Properties

Article ID: 972251 - Last Review: October 7, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 3.5 Service Pack 1
  • Microsoft .NET Framework 3.5
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB972251

Give Feedback

 

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