BasicHttpBinding with Certificate authentication - error “forbidden”?

后端 未结 2 511
梦毁少年i
梦毁少年i 2021-01-05 06:18

I\'m trying go get WCF server and client mutually authenticate each other using SSL certificates on transport level using BasicHttpBinding. Here\'s how the server is getting

2条回答
  •  醉话见心
    2021-01-05 07:03

    If you use standard generated proxy class you can to set transport client credential type to Certificate in App.Config:

    
        
            
        
    
    

    C#

    var client = new MyServiceSoapClient()
    X509Certificate2 cert = CertificateHelper.GetClientCertificate();
    client.ClientCredentials.ClientCertificate.Certificate = cert;
    

提交回复
热议问题