Note that there are some explanatory texts on larger screens.

plurals
  1. POConsume WCF service over HTTPS/SSL from console application
    text
    copied!<p>I have a WCF service running under IIS configured to use SSL, with a valid certificate already installed and running. Visiting the website with </p> <pre><code>https://my_website/anypage.aspx </code></pre> <p>I can access the page. Visiting the url </p> <pre><code>https://my_website/mywcfservice.svc </code></pre> <p>I can see the webservice page: "You have created a service. To test this service, you will need to create a client and use it to call the service(...) ". Note that I'm receiving anyway the warning page saying "There is a problem with this website's security certificate" where I click "Continue to this website".</p> <p>in server side, the web.config is configured with:</p> <pre><code>&lt;security mode="Transport"&gt; &lt;transport clientCredentialType="None" /&gt; &lt;/security&gt; </code></pre> <p>... ... </p> <p>In client side, I'm not using proxy or config file. I'm connecting using code only, like:</p> <pre><code>this.Channel = new ChannelFactory&lt;T&gt;(binding, new EndpointAddress(serviceUri)); ((WSHttpBinding)this.Channel.Endpoint.Binding).Security.Mode = SecurityMode.Transport; ((WSHttpBinding)this.Channel.Endpoint.Binding).Security.Transport.ClientCredentialType = HttpClientCredentialType.None; this.Channel.CreateChannel(); </code></pre> <p>I have strong rules to connect from client by code so I can't use other way. the channel is well opened but when I'm calling any method I receive error "the remote certificate is invalid according to the validation procedure."</p> <p>Without https was working ok.</p> <p>In client side I have a many certificates in "Trusted Root Certification Authorities\Certificates". All of them are also trusted in server side.</p> <p>Where could be the issue, in client or server side ?? Maybe I need to specify one very precise certificate to use in client side ??</p> <p>any help appreciate, thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload