winforms - WebBrowser 控件不会显示同一台 PC 上的 IE8 会显示的 https 站点

标签 winforms internet-explorer-8 webbrowser-control

在 IE8 中,我收到以下警告,但如果我选择继续,该站点将正确显示。

  There is a problem with this website's security certificate. 


 The security certificate presented by this website was issued for a different website's address.

Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.  
  We recommend that you close this webpage and do not continue to this website.  
  Click here to close this webpage.  
  Continue to this website (not recommended).  
     More information 

在 WebBrowser 控件中,我首先得到这个:
  Navigation to the webpage was canceled 

   What you can try: 
     Refresh the page. 

当我点击刷新页面时,这一次,我得到了和最初在 IE8 中一样的想要,但是当我单击“继续访问此网站(不推荐)”时,页面再次刷新,显示相同的警告。

我该怎么做才能使网站像在 IE8 中一样显示在 WebBrowser 控件中。我原以为控件将使用相同的核心逻辑,因此期望得到相同的结果。

具体来说,我尝试访问的站点是公司 Outlook Web Access 站点。访问此站点时,我对 Web 浏览器控件的另一个问题是,当我单击电子邮件时,通常在 IE 中,电子邮件会在新窗口中打开。使用 Web 浏览器控件时,系统会提示我输入密码。输入一个会使弹出窗口消失,但不显示电子邮件。

控件上是否有任何设置可以使网站的行为与在 IE8 或任何其他浏览器中一样?

最佳答案

试试 display the certificate dialog因此您的用户可以选择将证书安装到受信任的证书存储区。

要检测当前网站是否显示安全网站,handle the DWebBrowserEvents2::SetSecureLockIcon event .

关于winforms - WebBrowser 控件不会显示同一台 PC 上的 IE8 会显示的 https 站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2459603/

相关文章:

c# - .ScaleControl 的 WPF 版本?

c# - 如何在 PictureBox 上捕获鼠标坐标?

c# - USING block 在网站和 Windows 窗体中的行为不同

jquery - Windows XP 和 IE8 组合 - div 对齐问题

javascript - 如何在 IE8 中调试堆栈溢出错误

c# - 如何以编程方式回答 "Yes"到 WebBrowser 控件安全警报

c# - 克服 32 位限制,当使用由数百万个单位翻译的 System.Drawing.Graphics 表面时

javascript - 当 IE 8 中的尺寸更改(高度、宽度)时,VML 中的可拖动元素会卡住

c# - 如何在 geckofx 中获取 iframe 地址?

c# - 使用 WebBrowser 和单线程单元 C# 进行网页抓取