0

I am trying to code an application that will launch several different browser, each with a different proxy, so I use Cef.Initialize to give a different proxy to each of my browser, but here I get this error and am not sure what I am doing wrong.

"Cef can only be initialized once. Use Cef.IsInitialized to guard against this exception."

private void Start()
{

  CefSettings settings = new CefSettings();

  settings.CefCommandLineArgs.Add("proxy-server", Proxy);
  Cef.Initialize(settings);
}
ivcubr
  • 1,988
  • 9
  • 20
  • 28
  • As the exception says you can only initialize once. Read https://github.com/cefsharp/CefSharp/wiki/General-Usage#proxy-resolution don't set the proxy via command line when using a `RequestContext`. – amaitland Aug 01 '18 at 11:43
  • This is pretty much a duplicate of https://stackoverflow.com/questions/48613266/proxy-for-only-one-browser-with-cefsharp-offscreen?rq=1 – amaitland Aug 01 '18 at 11:45

0 Answers0