If the target site uses self-signed HTTPS certificate and this self-signed certificate is otherwise valid for the target domain, there is a solution how to make the WebView work in this case – you just need to add the specific certificate inside Package.appxmanifest -> Declarations -> Certificates whitelist. Yes, that’s the risk here, even though in 99.99% of cases no-one is actually eavesdropping you, only the server is just not properly configured. If the target page is available only on HTTPS protocol and the Domain certificate for the target web is not valid (expired, self-signed, invalid domain name…) then the page won’t load, you only get the OnNavigationFailed event with WebErrorStatus.CertificateIsInvalid or similar indicator.Īs you probably know, in standard browsers like IE, Chrome, Firefox or Edge there is always a semi-hidden option to override this certificate error and continue navigation to that page anyway, usually with a big warning that the connection won’t be secure and possible attacker could be eavesdropping your connection or even modifying the transmitted data. In standard scenarios you just set the Source property or use the Navigate(Uri) method to the target page and if your Internet connection works, the page shows up just like in Microsoft Edge.īut there is a caveat when using the method. If you want to display web page content inside your Windows 10 UWP app, you need to use the WebView class. This is a first part of my small series of blogposts about unlocking hidden features of Windows 10 UWP WebView.
0 Comments
Leave a Reply. |