Welcome Guest Search | Active Topics | Sign In | Register

EO.WebBRowser - Clear cache & cookies Options
joinyasin
Posted: Monday, August 15, 2016 1:25:50 AM
Rank: Member
Groups: Member

Joined: 3/17/2016
Posts: 12
again i failed to find that how i can use this perameter delet Cache for my selected engine can you please post the complete vb or c# code for my enginefrmStep2 and enginefrmStep4 in Form2 and Form4
it will be helpful to me
Thanks
eo_support
Posted: Monday, August 15, 2016 10:13:58 AM
Rank: Administration
Groups: Administration

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

You need to seek other channels for such basic programming questions. We tell you what function you need to call, you need to figure out the correct syntax yourself.

Thanks!
James
Posted: Thursday, October 13, 2016 9:14:41 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
Why hasn't this feature been investigated, or put on the development roadmap. I see countless requests to be able to do this on the forum, so there is definitely interest in having the feature available.
To be perfectly honest, having to shut down all webviews in order to clear the cache is error prone, and a shoddy work around at best.

Can we get some explanation as to why this feature request has gone ignored for the past few years now?
eo_support
Posted: Thursday, October 13, 2016 9:58:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
James wrote:
Why hasn't this feature been investigated, or put on the development roadmap. I see countless requests to be able to do this on the forum, so there is definitely interest in having the feature available.
To be perfectly honest, having to shut down all webviews in order to clear the cache is error prone, and a shoddy work around at best.

Can we get some explanation as to why this feature request has gone ignored for the past few years now?


Hi,

We are not ignoring it. It just takes time and effort to make it work reliably ---- and to be perfectly honest to you -- we haven't been able to make it working reliability yet. There is as much interest on our side to support this as users and we are trying to bring this feature to our user as fast as possible.

Thanks!
James
Posted: Thursday, October 13, 2016 10:04:29 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
Thank you for the honest response, it is really appreciated. I've found the same problem to be true with the work around.
We attempt to clear our cache when our application starts and stops, in order to prevent hanging onto old versions of pages.

I've also noticed however, that developers who setup their web pages to ignore caching, still run into problems with caching, which suggests to me there is a problem with that portion of the code specifically. Maybe there is a bug in the chromium code base causing this, and its more pervasive than just EO?
eo_support
Posted: Thursday, October 13, 2016 10:15:05 AM
Rank: Administration
Groups: Administration

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

Without having thoroughly solved this problem yet on our side we can't say for sure the problem is in Chromium code base. The main challenge is in Chromium the cache/cookie/history clearing is asynchronous --- the user can start it anytime and it will finish whenever it finishes, and how requests are served in the mean time is a fairly complicated business. Ideally we would like to avoid the asynchronous nature because from an API point of view, when you want to clear the cache you really do want to throw the cache away immediately. And if we can not make that happen, we would have to have some kind of callback to notify you that you are done. Those are the issues that we are dealing with, that's why we haven't been able to support this feature yet. But we do understand that a lot of people want this feature, so please be rest assured that we are definitely not ignoring it.

Thanks!
James
Posted: Thursday, October 13, 2016 10:40:37 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
I see your dilemma. It would certainly be easy to release the Async call, but it's easily a source of bugs that will be hard to resolve, since certain assumptions will be made that shouldn't happen.
Thank you for the detailed explanation, I can appreciate the complexity of the issue and I look forward to your solution.
eo_support
Posted: Thursday, October 13, 2016 10:50:00 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
You are very welcome. Please feel free to let us know if you have any more questions.
James
Posted: Monday, October 17, 2016 12:03:18 PM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
Is there perhaps a way to load a url while ignoring the local cache?
eo_support
Posted: Monday, October 17, 2016 5:25:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
James wrote:
Is there perhaps a way to load a url while ignoring the local cache?


Hi,

This is not currently supported. We are experimenting this and hopefully will support it early next year.

Thanks!
ruk
Posted: Tuesday, June 13, 2017 11:10:39 PM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
In our application, we support users to log-in and logout. After user1 logs out and user2 logs-in, we are not getting the NeedCredential event callback to pass the new credentials. We tried to dispose WebView and create a new one. This didn't help.

We are suspecting this may be related to cached cookies. We cannot restart our application when users switch happens, this is a hard requirement. Is there a way to make this work so that the credentials are passed after a user logs in?

Also, I read about stopping the engine in this thread to clear cache. What is the relation between engine and webviews? In our application at any given time there may be multiple instances of WebBrowsers be running. Do all these run on same engine?
ruk
Posted: Tuesday, June 13, 2017 11:31:03 PM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
Also, one more question. The Engine proxy also takes username and password. I'm wondering if this is suitable for our application scenario as indicated in the previous message above. At any given time, our application is logged-in with a user or no one logged-in. And during the life time of the application user can log-off and other users can log-in without exiting the application. Currently we are trying with WebView NeedCredential event but having issues as noted in the previous post.
eo_support
Posted: Wednesday, June 14, 2017 9:24:23 AM
Rank: Administration
Groups: Administration

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

There is a one to many relationship between a WebView and a Engine. An engine can manage many WebViews but a WebView belongs to exactly one Engine. The Engine manages all the WebViews and other "global" things such as cache, cookie, proxy, etc. If you want to clear those, you will need to stop the engine and then clear the cache folder. See here for more details about the engine:

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

Thanks
ruk
Posted: Wednesday, June 14, 2017 10:03:20 AM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
Thank you for the clarification. Looks like when a user logs-in to our application we need to stop and start the engine. So, the steps would look something like:

On a new user logs-in to our application (user 1 logs off and user 2 logs in):
- Stop the engine. We don't create any engine and use the default engine for all instances of web control. So, there should be one engine to stop and start.
- Create a new WebView for each of the WPF WebControl and assign the webView to WebControl.
Does this sound right?

In our application, the WebControl should always run based on the logged-in user in the application, and not the OS logged-in user. Wondering how the default Engine is initialized. Is the proxy for the default engine uses OS credentials by default? Wondering if we pass in the user credentials from application to Engine when it is created would be a better choice.

eo_support
Posted: Wednesday, June 14, 2017 10:22:39 AM
Rank: Administration
Groups: Administration

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

After you stop the engine, you will need to explicitly delete the cache folder. You can do that with this function:

https://www.essentialobjects.com/doc/eo.webengine.engine.cleanupcachefolders_overloads.aspx

You can also delete the folder yourself if you have explicitly set the cache folder. In either case, you won't be able to delete the cache folder if the engine is running.

Currently our engine does not provide a way for you to switch user context. It will always run under the same user token associate to your process. So if you dynamically switch user token through out your process's life time, it will not have any impact on the browser engine. Internally we do support creating engine under a different user context, we will look into that and see if we can expose that feature so that you can use it. If we do expose this feature, then you must explicitly create Engine object. You can not use the default Engine since the default Engine will always use your process's user token. Note this part only affect Windows authentication (for example, when your web server uses integrated Windows authentication). It does not affect proxy settings.

Chromium browser engine does try to load proxy settings from registry. However in a multi-user context you described we would not recommend you to rely on it.

An alternative approach is after user login, you create a child process under the new user's token and then everything goes off as that user from that point on. This is in fact how Windows works --- when you login through winlogon.exe, Windows establish a security context for the newly logged in user and all processes are then created under that user. This is the cleanest way to isolate multiple user since this is the architecture Windows uses. For example, by default the Engine object creates cache folder in the current user's temp directory. So if the user is switched the temp directory will also be switched (by Windows), thus you don't even need to delete the cache folder at all.

Thanks!
VSSPVarmaK
Posted: Friday, June 16, 2017 2:28:05 PM
Rank: Newbie
Groups: Member

Joined: 6/16/2017
Posts: 1
Hi

During the Login change, even after stopping and starting the Engine (cleared the Cache), The "NeedCredential" event is not getting fired and hence it didnot respond to the new 'Login' credentials.

One observation i have is, i did the following setting in the 'InternetOptins'

1) Goto IE -> InternetOptions->SecurityTab->CustomLevel
2) Under the 'UserAuthentication' settings, i changed the 'Logon' settings to "Prompt for user name and password".

Now, it started firing the Event 'NeedCredentials' after Login change.

Do we have any way to overwrite these setting in 'BrowserEngine' (locally)?
ruk
Posted: Friday, June 16, 2017 4:34:52 PM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
We tried stopping the engine with delete cache option. And restarted the engine when new user logs into our application. We still don't get the NeedCredential call back and the website still shows as the OS logged-in user and not the user logged-in into our application. Our application supports only windows users to log on, so the logged-in user is always a Windows user. Please see if there is way to set the user context when we create an engine.
eo_support
Posted: Saturday, June 17, 2017 10:35:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
ruk wrote:
Please see if there is way to set the user context when we create an engine.


We are looking into this part. In the mean time the only available option is to create a child process under the new user's context, then let that child process to create the engine as we described in our early reply. The key is in the current version the engine will always be created under the process's user account, not your current user account.
ruk
Posted: Saturday, June 17, 2017 3:49:54 PM
Rank: Advanced Member
Groups: Member

Joined: 5/15/2017
Posts: 48
Thank you for looking into this. Meanwhile, we will try with child process approach you mentioned. One question regarding this approach - if a child process creates an engine, how do we assign that engine created in that child process to the WebView running in the main process? The WebControl in our application has to be running on the main process. We are new to EO and appreciate any sample code or any help.
eo_support
Posted: Sunday, June 18, 2017 11:07:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
ruk wrote:
Thank you for looking into this. Meanwhile, we will try with child process approach you mentioned. One question regarding this approach - if a child process creates an engine, how do we assign that engine created in that child process to the WebView running in the main process? The WebControl in our application has to be running on the main process. We are new to EO and appreciate any sample code or any help.


You can't. Everything has to occurs in the "child branch". That's where the user security context changes.


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.