Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I want to define a new RequestContext when using CefSharp OffScreen to prevent multiple browser instances sharing the same information (e.g. cookies).
I can simply do that with CefSharp WinForms like that:
RequestContextSettings requestContextSettings = new RequestContextSettings();
requestContextSettings.PersistSessionCookies = false;
requestContextSettings.PersistUserPreferences = false;
WebBrowser.RequestContext = new RequestContext(requestContextSettings);
But the RequestContext is readonly in the offscreen variant.
See http://cefsharp.github.io/api/57.0.0/html/P_CefSharp_OffScreen_ChromiumWebBrowser_RequestContext.htm
Why is that so? And are there other ways to accomplish it?
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.