Custom IInternetSecurityManager not being called with dialogs

前端 未结 2 470
难免孤独
难免孤独 2020-12-20 10:21

Hello and thank you for looking.

Problem Description:

I have implemented a c# WinForm application with the browser control embedded and have

相关标签:
2条回答
  • 2020-12-20 10:47

    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.

    0 讨论(0)
  • 2020-12-20 10:57

    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.

    0 讨论(0)
提交回复
热议问题