c# - How to handle an unsecured or incorrectly secured fault in WCF? -


i have webapi project connects wcf service on https. project installed on 2 different development machines , started locally using iis express.

the service works fine on 1 machine. however, on other machine, following error:

an unsecured or incorrectly secured fault received other party. see inner faultexception fault code , detail.

the inner faultexception is:

exception during request

the same error happens when running webapi on actual iis. code connects service is:

endpointaddress ea = new endpointaddress(new uri(url), new dnsendpointidentity(identity), new addressheadercollection().toarray()); myservice service = new myservice(new custombindingsecureheader(), ea);  service.endpoint.endpointbehaviors.add(new custommessageinspector()); service.clientcredentials.servicecertificate.authentication.certificatevalidationmode = x509certificatevalidationmode.none; service.clientcredentials.servicecertificate.defaultcertificate = new x509certificate2(servercert); service.clientcredentials.clientcertificate.certificate = new x509certificate2(clientcert, clientpassword, x509keystorageflags.machinekeyset); 

is there way further details on exception? there missing in above code?


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -