Link to home
Create AccountLog in
Avatar of mkdev2009
mkdev2009Flag for Malaysia

asked on

Could not establish trust relationship for the SSL/TLS secure channel with authority

Hi,

i got a Console application and added a service reference for 1 HTTPS web service. below is my code to call the web service method:

 
using (clsSoapPortClient client = new clsSoapPortClient())
                {
                    client.Charge("user","pass",100);
                    client.Close();
                }

Open in new window


when the code reach the client.charge(); method i hit the error "Could not establish trust relationship for the SSL/TLS secure channel with authority".

below is my app.config setting:

 
<basicHttpBinding>
        <binding name="clsE1EWIG2SoapBinding" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="">
              <extendedProtectionPolicy policyEnforcement="Never" />
            </transport>
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>





      <endpoint address="https://0.0.0.0:9700/cgw" binding="basicHttpBinding"
        bindingConfiguration="clsSoapBinding" contract="ServiceReference1.clsSoapPort"
        name="clsSoapPort" />

Open in new window


please help..
ASKER CERTIFIED SOLUTION
Avatar of Rahul Agarwal
Rahul Agarwal
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer