WebBrowser in .NET fails to display pages that require SSL client authentication

Asked 1 years ago, Updated 1 years ago, 48 views

I have created a form in VB.NET that shows pages that require SSL client authentication using the .NET WebBrowser control. The .NET Framework is 4.5.

The program on the form is

Me.webBrowserCtrl.Url=New Uri("https://xxxx/xxx.html")

and

In Windows 7+ Internet Explorer 11,

  • Installing the Root CA and Client Certificates on IE
  • Internet Options→Security adds the domain of the target page to the Trusted Sites
  • Then set "Select Certificate if Only One Existing Client Certificate" to "Enable" in "Customizing Levels" in "Trusted Sites"

With the above settings, we have verified that the Select Client Certificate dialog does not appear when IE accesses the target page.
After that, when I started the form I created, I was able to display the target page correctly.

However, in the Windows Server 2012R2+ Internet Explorer 11 environment,
IE works as per the above environment, but the form you created shows "Navigation to Web Page Cancelled" and cannot be accessed.
In Windows 7, "Selecting a Certificate if Only One Existing Client Certificate" was disabled, so I suspect that IE will not take over the WebBrowser control in Windows Server 2012R2.

Is there a way to view pages that require SSL client authentication in a form application in a Windows Server 2012R2+ Internet Explorer 11 environment?

.net ssl internet-explorer

2022-09-29 20:29

1 Answers

Self-resolved.

The reason seems to be that the "ScriptErrorsSuppressed" property of the WebBrowser control was set to True.
Setting this property to False also worked fine with Windows Server 2012R2+IE11 (by the way, the regular HTTP protocol web pages were accessible regardless of the property).

However, if this "ScriptErrorsSuppressed" property is True,

  • In Windows 7+IE11 environments, both regular web pages and SSL client authentication required pages are accessible successfully.
  • Regular web pages are accessible successfully in Windows Server 2012R2+IE11 environments, but SSL client authentication required pages are not accessible.

The reason for this phenomenon remains unknown.
There was no problem with False this time, but I have a headache when I think about the case where it needs to be true.


2022-09-29 20:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.