Popular Posts

Saturday, September 22, 2012

Transport Security with Certificate Authentication

Configuration for using Certificate in both Client and Service using SSL and 509 Certificate -> ClientCridentialType = Certificate

Transport Security with Certificate Authentication:

'via Blog this'

Seven simple steps to enable HTTPS on WCF WsHttp bindings - CodeProject

Configuration for HTTPs -> SSL

Seven simple steps to enable HTTPS on WCF WsHttp bindings - CodeProject: "behaviorConfiguration"

'via Blog this'
The following config file worked perfectly fine for me for hosting the WCF under HTTPs and certificates:
Code Snippet
  1. <system.serviceModel>
  2.   <services>
  3.     <service name="WCF.IIS.Deployment.ServiceApplication.MathService" behaviorConfiguration="MathServiceBehaviour">
  4.       
  5.       <endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecurityByTransport" contract="WCF.IIS.Deployment.ServiceApplication.IMathService">
  6.       </endpoint>
  7.  
  8.       <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
  9.       
  10.       <host>
  11.         <baseAddresses>
  12.           <add baseAddress="https://localhost/WCF.IIS.Deployment.Services/" />
  13.         </baseAddresses>
  14.       </host>
  15.  
  16.     </service>
  17.  
  18.   </services>
  19.  
  20.   <bindings>
  21.     <basicHttpBinding>
  22.       <binding name="SecurityByTransport">
  23.         <security mode="Transport">
  24.           <transport clientCredentialType="None" />
  25.         </security>
  26.       </binding>
  27.     </basicHttpBinding>
  28.   </bindings>
  29.   
  30.   <behaviors>
  31.     <serviceBehaviors>
  32.       <behavior name="MathServiceBehaviour">
  33.         <serviceMetadata httpsGetEnabled="true" />
  34.         <serviceDebug includeExceptionDetailInFaults="false" />
  35.       </behavior>
  36.     </serviceBehaviors>
  37.   </behaviors>
  38. </system.serviceModel>