Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

WCF services fail with NotSupportedException or ServiceActivationException after applying updates for .NET Framework 4


Symptoms

Consider the following scenario. You have a Windows Communication Foundation (WCF) service using Microsoft .NET Framework 4.0, hosted in a Microsoft Internet Information Services (IIS) web server. Under the SSL settings for the web application, you have enabled "Require SSL" as well as requiring client certificates. You then apply one of or more of the following hotfixes for WCF on .NET Framework 4:



In this configuration, when you try to browse to or make a method call to the WCF service that is using client certificate authentication, you may receive an error message and stack trace similar to the one below. You may receive this error even if you have not changed any other setting in the WCF configuration or IIS SSL configuration:
System.NotSupportedException: The SSL settings for the service 'None' does not match those of the IIS 'Ssl, SslNegotiateCert, SslRequireCert'. 
Stack Trace:
[NotSupportedException: The SSL settings for the service 'None' does not match those of the IIS 'Ssl, SslNegotiateCert, SslRequireCert'.]
System.ServiceModel.Activation.HostedAspNetEnvironment.ValidateHttpsSettings(String virtualPath, Nullable`1& requireClientCertificate) +186762
System.ServiceModel.Channels.HttpsChannelListener.ApplyHostedContext(String virtualPath, Boolean isMetadataListener) +176
System.ServiceModel.Channels.HttpsTransportBindingElement.BuildChannelListener(BindingContext context) +123
System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +177
System.ServiceModel.Description.ServiceMetadataExtension.CreateGetDispatcher(Uri listenUri, Binding binding) +189
System.ServiceModel.Description.ServiceMetadataExtension.EnsureGetDispatcher(Uri listenUri, Boolean isServiceDebugBehavior) +229
System.ServiceModel.Description.ServiceMetadataBehavior.EnsureGetDispatcher(ServiceHostBase host, ServiceMetadataExtension mex, Uri url, String scheme) +195
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +3565
System.ServiceModel.ServiceHostBase.InitializeRuntime() +82
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +64
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +255
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132

[ServiceActivationException: The service '/WCFService/Service1.svc' cannot be activated due to an exception during compilation. The exception message is: The SSL settings for the service 'None' does not match those of the IIS 'Ssl, SslNegotiateCert, SslRequireCert'..]
System.Runtime.AsyncResult.End(IAsyncResult result) +890624
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +181790
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107

↑ Back to the top


Cause

This issue occurs due to a mismatch in the versions of System.ServiceModel.Activation.dll and System.ServiceModel.dll.


↑ Back to the top


Resolution

To resolve this problem, install the Microsoft hotfix 2537715 after installing any of the hotfixes mentioned in the above list.


↑ Back to the top


More Information

If you already have the Microsoft hotfix 2537715 installed, and then you install one of the hotfixes mentioned above in the Symptoms section, then the Activation Exception issue described in this article does not occur.


↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2740200
Revision : 1
Created on : 1/7/2017
Published on : 9/7/2012
Exists online : False
Views : 114