Welcome Guest Search | Active Topics | Sign In | Register

Incognito or private mode Options
usyber
Posted: Tuesday, February 2, 2016 6:42:55 AM
Rank: Newbie
Groups: Member

Joined: 11/12/2015
Posts: 9
Dear support team,

I have a tab based web browser .NET 2.0 WinForm application with different users and roles. The application allows login as an other user without restarting. Therefore and due to requirements from server side (edit mode) I need to have something like a private/ incognite mode without sharing cookie information. In some forum entries I found the .Net AppDomain concept as a soultion but will using the WinForm API it is not possible to share the WebControl over domain boundaries (TabControl.Add(isolatedWebControl)).

http://www.essentialobjects.com/forum/postst8826_Separate-cookies-between-web-browsers-in-same-app-and-same-site.aspx

Therefore I was searching for an alternative and I found the following solution which seems to work correctly but I don't know whether this is allowed by the API of the browser controls.

Quote:

//Web control
webControl = new WebControl { Parent = webPanel, BackColor = Color.White, Dock = DockStyle.Fill };

//One engine per Tab
var engine = Engine.Create(Guid.NewGuid().ToString());

//One thread runner per engine
var threadRunner = new ThreadRunner("Test", engine);

//Creates the WebView which will append to the WebControl
webView = threadRunner.CreateWebView();

//Add the web view
webControl.WebView = webView;


http://www.essentialobjects.com/ViewDoc.aspx

Is it allowed and are there maybe disadvantages when I like to use one Engine per Tab control? When the user closes the tab I will stop the created engine.

best regards,
Uli
eo_support
Posted: Tuesday, February 2, 2016 10:46:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Using a separate Engine is the recommended method to support incognite mode. See here for more information about using engines:

http://www.essentialobjects.com/doc/webbrowser/advanced/engine.aspx

You do not need to use the ThreadRunner. ThreadRunner is for running WebView without a UI and it is not tied to separate engines.

Thanks!
usyber
Posted: Wednesday, February 3, 2016 1:49:45 AM
Rank: Newbie
Groups: Member

Joined: 11/12/2015
Posts: 9
Thank you very much for your answer.

I have removed the ThreadRunner and everything works fine!

best regards,
Uli
eo_support
Posted: Wednesday, February 3, 2016 10:51:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Great. Glad to hear that it works for you. Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.