Windows 10 Universal App - Ignore SSL Certificate Valdiation

前端 未结 1 1655
执笔经年
执笔经年 2020-12-06 21:16

I am working on a phone Windows 10 Universal Application. I am trying to connect to an OAuth server with auto-signed certificate.

When I open a web view to that serv

相关标签:
1条回答
  • 2020-12-06 21:36

    In Windows Runtime the webview should not ever go to an untrusted page, so you will meet the above exception.
    In order to solve your problem, you need to include the Certificates on your UWP app or you have to Ignore SSL Certificate errors.

    For how to include the Certificates on your UWP app, you need to add the “Certificate” Declaration to your Package.appxmanifest.
    For more information, please try to refer to this article: http://blogs.msdn.com/b/wsdevsol/archive/2014/06/05/including-self-signed-certificates-with-your-windows-runtime-based-windows-phone-8-1-apps.aspx

    Yes, ServicePointManager is not available in the Windows Runtime app, in order to ignore SSL Certificate errors, we can use the HttpBaseProtocolFilter.IgnorableServerCertificateErrors | ignorableServerCertificateErrors property to help us. For more information, please try to refer to the following two articles:
    http://blogs.msdn.com/b/wsdevsol/archive/2013/10/17/how-to-ignore-self-signed-certificate-errors-in-windows-store-apps-8-1.aspx.
    https://bernhardelbl.wordpress.com/2013/06/28/ignore-ssl-certificate-errors-in-windows-8-1-apps/.

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