开发者

.NET webbrowser security prompt

I am using a .NET web browse control for windows forms. Every time I visit this specific web page, I get this specific prompt: http://screensnapr.com/v/fS15lG.png

This nag box disrupts the program flow. Ive tried the accepted answer from this post: How to disable "Security Alert&quo开发者_开发知识库t; window in Webbrowser control But it did nothing to stop the prompt.

Is there a way to disable it through code.


Not that i know of, the issue is some of your content is served over https and some over http, change the urls of the items in your page to start with https:// or better yet change them to //<domain>/path/to/item.ext note the omission of http: or https: so that the resources are requested over whatever transport you have connected with.


It is a secure zone setting that you can override via installing your own IInternetSecurityManager implementation. MSHTML calls the QueryInterface method on the IOleClientSite interface to get the IServiceProvider interface in order to query your IInternetSecurityManager implementation, which means you need derive from System.Windows.Forms.WebBrowser.WebBrowserSite in order to add an IServiceProvider implementation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜