My apologies if this has limited information. I'll add more info if somebody asks for it. I'm just not sure what to give you.
I'm making a SOAP call to a 3rd party. They require mutual authentication. This means their servers send an SSL cert to me. I send one to them. Then in the SOAP message there's another cert.
Given that in the code when it comes to make the call I get the following exception.
Could not find endpoint element with name 'AmexHost2HostServiceReference.IH2HServiceService_NO_TransFee' and contract 'AmexHost2HostServiceReference.IH2HServiceService_NO_TransFee' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element. (System.SystemException {System.InvalidOperationException})
my app.config is below. I honestly don't know what most of it is. I copied form an example project they sent me.
Any help in the right direction is appreciated. If you have a link to mutual authentication tutorial that would be great too.
Thanks
<behaviors>
<endpointBehaviors>
<behavior name="NewBehavior">
<customClientCredentials>
<clientCertificate findValue="cert fingerprint here" storeLocation="LocalMachine" x509FindType="FindByThumbprint" />
<clientMessageCertificate findValue="cert fingerprint here" storeLocation="LocalMachine" x509FindType="FindByThumbprint" />
</customClientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="NewBinding0">
<textMessageEncoding messageVersion="IH2HServiceService_NO_TransFee" />
<security allowSerializedSigningTokenOnReply="true" authenticationMode="MutualCertificate"
enableUnsecuredResponse="true"
requireDerivedKeys="false"
includeTimestamp="false" messageProtectionOrder="SignBeforeEncrypt"
messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireSecurityContextCancellation="true">
<issuedTokenParameters keyType="AsymmetricKey" />
<localClientSettings cacheCookies="true" detectReplays="false" />
<localServiceSettings detectReplays="false" />
<secureConversationBootstrap />
</security>
<httpsTransport requireClientCertificate="true" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="hend pint https address goes here"
behaviorConfiguration="NewBehavior"
binding="customBinding"
bindingConfiguration="NewBinding0"
contract="H2HServiceService_NO_TransFeeClient"
name="IH2HServiceService_NO_TransFee">
<identity>
<dns value="AXP web Service" />
</identity>
</endpoint>
</client>
<extensions>
<behaviorExtensions>
<add name="customClientCredentials" type="CustomClientCredentials.CustomClientCredentialsElement, CustomClientCredentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</behaviorExtensions>
</extensions>