|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
I have a WPF application with a Canvas control that loads children onto and removes. One of the children is the EO.WebBrowser. I want to remove the child (EO.Webbrowser) and then delete the cookie file. I'm noticing that even though i remove the child from the canvas, the cookie file is still in use.
As a workaround, I am connecting to the Cookie db through SQLite. I am able to select rows but am unable to update or delete them. Any idea if this is possible?
thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is not possible in the current build unless you unload your AppDomain. We are in the process of adding support to allow you to shutdown the browser engine without unloading AppDomain. After that is done you can create a separate browser engine in your code, create WebView using that engine, and then shutdown that engine. After that you will be able to delete the cookie files.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
Thanks, Do you have an estimate of when that feature would be available?
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
In the meantime, I'd like to dispose of current webview and recreate a new one at runtime. Would it be done like this? (WebCtrl is the name of my WebControl)
WebCtrl.WebView.Dispose(); EO.WebBrowser.Wpf.WebView NBrowser = new EO.WebBrowser.Wpf.WebView(); NBrowser.Url = "http://www.google.com"; WebCtrl.WebView = NBrowser;
The webview disposes, but the new webview never shows. thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We do not have a fixed timeline about the separate engine interface yet. It should be out this year.
About replacing the WebView, have you tried replacing the whole WebControl? When a WebControl is removed from your UI element tree, the associated WebView will be automatically destroyed.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
I will try that, but I noticed that there is no dispose method for the webcontrol.
2nd question: if I don't set a cachepath, it still remembers the cookie after app is closed completely and restarted.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can try to call WebControl.WebView.Dispose() before disposing the old webControl. You can then create a new WebControl and WebView.
If you do not set CachePath, it will uses a default cache path based on the DLL version number. So the cookies are still remembered.
Thanks!
|
|