title: WebBrowser control - ignore SSL errors
body: <p>Many hours of searching has not lead to an answer.  We're looking for a way that a .NET WebBrowser control can navigate to pages with SSL security problems (self-signed certificates or non-matching hostnames) without stopping and displaying the error page:</p>
  
  <p><img src="https://i.stack.imgur.com/0c6oC.jpg" alt="http://imgur.com/Uqt7H"></p>
  
  <p>I've already seen many posts that are close:</p>
  
  <p><a href="https://stackoverflow.com/questions/178578/how-to-disable-security-alert-window-in-webbrowser-control">How to disable “Security Alert” window in Webbrowser control</a> -- doesn't work because WebBrowser apparently doesn't use the ServicePointManager</p>
  
  <p><a href="http://www.codeproject.com/KB/shell/WebBrowserControlDialogs.aspx" rel="nofollow noreferrer">Suppressing Hosted WebBrowser Control Dialogs</a> -- depends on knowing window titles, which doesn't work for a non-English audience</p>
  
  <p><a href="https://stackoverflow.com/questions/5288223/c-webbrowser-control-ignore-website-security-warnings">C# WebBrowser Control - ignore website security warnings</a> -- this was closed as a duplicate, and the answer just referred to the above link.</p>
  
  <p>Most form posts suggest implementing IInternetSecurityManager, which I've done, but to no avail.<br>
  Responding with a constant value for GetSecurityId for all URLs (specifying URLZONE_LOCAL_MACHINE or URLZONE_TRUSTED) doesn't work.  </p>
  
  <p>The following doesn't help:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>public unsafe int MapUrlToZone(string url, int* pdwZone, int dwFlags)
  {
      *pdwZone = 3; // URLZONE_TRUSTED;
      return Win32.S_OK;
  }
  </code></pre>
  
  <p>Finally, I can't seem to find a way for ProcessUrlAction to have any effect:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public unsafe int ProcessUrlAction(string url, int dwAction, byte* pPolicy, int cbPolicy,
              byte* pContext, int cbContext, int dwFlags, int dwReserved)
  {
      *((int*)pPolicy) = (int)Win32.UrlPolicy.URLPOLICY_ALLOW;
      return Win32.S_OK;
  }
  </code></pre>
  
  <p>Has anyone successfully found a way past that SSL warning page?</p>