我正在使用Windows窗体的.NET Web浏览控件。 每次访问此特定网页时,我都会收到以下特定提示: http://screensnapr.com/v/fS15lG.png
这个唠叨框会破坏程序流程。 我试过这篇文章中接受的答案: How to disable "Security Alert" window in Webbrowser control 但它没有阻止提示。
有没有办法通过代码禁用它。
答案 0 :(得分:1)
我不知道,问题是您的某些内容通过https提供,而某些内容通过http提供,更改网页中商品的网址以https://
开头,或者更好地将其更改为{{ 1}}请注意遗漏//<domain>/path/to/item.ext
或http:
,以便通过您连接的任何传输方式请求资源。
答案 1 :(得分:0)
这是一个安全区域设置,您可以通过安装自己的IInternetSecurityManager implementation来覆盖它。 MSHTML calls the QueryInterface method on the IOleClientSite interface to get the IServiceProvider interface in order to query your IInternetSecurityManager implementation,这意味着您需要从System.Windows.Forms.WebBrowser.WebBrowserSite派生,以便添加IServiceProvider实现。