self signed cert. The underlying connection was closed: Could not establish trust relationship

前端 未结 2 1792
醉梦人生
醉梦人生 2020-12-17 19:25

Trying to set up a self signed certificate, for our intranet\'s web services site. The certificate itself shows it is \"ok\" but when trying to invoke a method from the web

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 19:44

    iamkrillin did have a working solution, in that his code will ignore the invalid cert, and allow the application to use the web service.

    In addition to this, I have corrected the certificate so that i no longer need to ignore the invalid cert.

    The host header value (shown in OP) was WebServices.mycompany.vmc , but the "Common Name" or "Friendly Name" for the certificate (shown in OP screenshot 3 for 'Certification Path') was WebServices.

    The common name, and the website URL need to match. I recreated the self-signed cert with a common name of "WebServices.mycompany.vmc" and now the certificate error is gone. The web service is available for use, without the coder needing to ignore invalid certs for the application.

提交回复
热议问题