Custom IInternetSecurityManager not being called with dialogs

我的未来我决定 提交于 2019-11-29 13:02:40
herobeast

You can override the web-browser's control method CreateWebBrowserSiteBase.

protected override WebBrowserSiteBase CreateWebBrowserSiteBase()
{
    return new ExtendedWebBrowserSite(this);
} 

and implement ExtendedWebBrowserSite like this:

class ExtendedWebBrowserSite : WebBrowser.WebBrowserSite,
    IDocHostShowUI,
    IfacesEnumsStructsClasses.IServiceProvider,
    IInternetSecurityManager
    ...

That can call the class IInternetSecurityManager.

One option would be to create your own dialog form (in C#) with another custom-security WebBrowser control on it. Then you can call from Javascript to C# to open the form instead of using showModalDialog.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!