Hello Guys,
I am working in .net core 2.2 and i have a requirement that i will need to consume 3rd arty SOAP service and they have certificate based authentication. This is pretty standard in .net framework by creating the soap service as proxy and in the webconfig we have this .
<system.serviceModel><behaviors><endpointBehaviors><behavior name="MC.behavior.rdy"><clientCredentials><clientCertificate findValue="MycompanyDomain.com" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /><serviceCertificate><defaultCertificate findValue="clientDomain.com" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /></serviceCertificate></clientCredentials></behavior></endpointBehaviors></behaviors><bindings><customBinding><binding name="UserServiceSoapBinding"><textMessageEncoding messageVersion="Soap12" /><security defaultAlgorithmSuite="Basic128Rsa15" allowSerializedSigningTokenOnReply="true" authenticationMode="MutualCertificate" securityHeaderLayout="Lax" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity10WSTrust2005WSSecurityPolicy11BasicSecurityProfile50" requireSecurityContextCancellation="false"></security><httpsTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" /></binding></customBinding><basicHttpBinding><binding name="ITransactionProcessor"><security mode="Message" /></binding></basicHttpBinding></bindings><client><endpoint address="https://clientDomain.com/services/UserService2009" binding="customBinding" bindingConfiguration="UserServiceSoapBinding" contract="UserService" name="UserServicePort" behaviorConfiguration="MC.behavior.rdy" ><identity><userPrincipalName value="IIS APPPOOL\NETWORK SERVICE" /></identity></endpoint> </client></system.serviceModel>
how do i achieve this in .net core 2.2. is there a way? i can add the connected service to create proxy. but no idea about this certificate based authentication implementation while consuming the soap service in .net core. Please help me in this and in case if there is any sample please do share it here. it wold be much helpful to me.