Wednesday, July 20, 2016

WCF Error The ExtendedProtectionPolicy.PolicyEnforcement values do not match

Error Message :
==============

The extended protection settings configured on IIS do not match the settings configured on the transport.  The ExtendedProtectionPolicy.PolicyEnforcement values do not match.  IIS has a value of Never while the WCF Transport has a value of Always. 



Binding Configuration Used:

<bindings>
  <netTcpBinding>
     <binding name="mynet" sendTimeout="00:00:05" portSharingEnabled="true">
       <security mode="None" />
     </binding>
  </netTcpBinding><basicHttpBinding>
     <binding name="myBinding" maxReceivedMessageSize="2147483647">        
       <security mode="TransportCredentialOnly">
         <transport clientCredentialType="Windows">
           <extendedProtectionPolicy policyEnforcement="Always"/>
         </transport>
       </security>
     </binding>
  </basicHttpBinding>
</bindings>

Solution : Set site policy enforcement :
===============================

1. Go to IIS and then to your hosted service listed under Sites.
2. Then go to "Authentication" in the IIS  section group.


3. Enable Windows Authentication.

4. Select Windows Authentication and click on Advanced Settings from Action panel.



5. Then set the extended protection to "Required" and click OK.
6. Now recheck the service URL.

No comments:

Post a Comment