Monday 8 May 2017

WCF endpoints authentiction with HTTP and HTTPS

Add in a new endpoint
<endpoint contract="PortalServices.IMenuService" binding="webHttpBinding" address="restService" behaviorconfiguration="restJsonBehaviour" bindingconfiguration="WindowsHttpBindingHttps" />
With a binding confuguration for https with transport security mode.

<binding name="WindowsHttpBindingHttps">
          <security mode="Transport">
            <!-- Needs to be "TransportCredentialOnly" for Windows and "Transport" for https -->
            <transport clientcredentialtype="Windows" />
          </security>        
        </binding>

Enable https on the binding

<servicemetadata httpgetenabled="true" httpsgetenabled="true" />     

 


    
      
        
      
    
    
    
      
        
        
		
            
    
    
      
        
		     
          
          
        
      
    
    
      
        
          
            
            
          		 
        
		
          
            
            
          		 
        
        
          
            
          
        
      
    
  

No comments:

Post a Comment