Windows Store Apps: The host name in the certificate is invalid or does not match

后端 未结 1 1141
遥遥无期
遥遥无期 2021-01-14 06:13

in my windows 8.1 application, when I call a web service, I get the following exception:

The host name in the certificate is invalid or does not match

相关标签:
1条回答
  • 2021-01-14 07:14

    Try:

    filter.IgnorableServerCertificateErrors.Add(
        ChainValidationResult.Untrusted |
        ChainValidationResult.InvalidName);
    

    For more certificate ooptions take a look at ChainValitadionResult enumeration

    0 讨论(0)
提交回复
热议问题