Welcome Guest Search | Active Topics | Sign In | Register

Cache Path (solved) Options
Ted
Posted: Friday, July 27, 2018 9:51:24 AM
Rank: Newbie
Groups: Member

Joined: 6/14/2015
Posts: 4
Hello,

Thanks for a wonderful product...I just upgraded from EO.WebBrowser 2016 to EO.WebBrowser 2018. I previously used:

EO.WebBrowser.Runtime.CachePath = dataPath;

My code still works, however, I get this warning:

Warning CS0618 'Runtime.CachePath' is obsolete: 'Please use Runtime.DefaultEngineOptions instead.'

So I guess at some point it will stop working so I would like to get ahead of the curve.

I have tried to research a solution, using this forum, google. I even read the link that was provided to previous posters of a similar question here:

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

However, that does not give enough detail for me to figure it out...can someone post better code or a link to the proper way to setup the cache path?

If anyone is curious, I am using this as a shell to run GMail so I don't have to run GMail in my browser window. I need to set the cache path so the app will remember the login creds so I don't have to type them in each time.

Thanks in advance for your help.

Cheers...
Ted
Posted: Friday, July 27, 2018 2:28:37 PM
Rank: Newbie
Groups: Member

Joined: 6/14/2015
Posts: 4
ok, I'm a goofball...I did a search on the word cache, but I must have typed it in wrong in my haste...I just did it again, and found the attribute right where it should have been. Just for documentation sake, here is the new code:

EO.WebEngine.EngineOptions options = new EO.WebEngine.EngineOptions();
options.CachePath = dataPath;
eo_support
Posted: Friday, July 27, 2018 2:43:22 PM
Rank: Administration
Groups: Administration

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

No. This is not how it should be. You should change your old code:

Code: C#
EO.WebBrowser.Runtime.CachePath = dataPath;


To:

Code: C#
EO.WebBrowser.Runtime.DefaultEngineOptions.CachePath = dataPath;


Thanks
Ted
Posted: Friday, July 27, 2018 3:52:09 PM
Rank: Newbie
Groups: Member

Joined: 6/14/2015
Posts: 4
Ok, thanks. Made the change and that seems to work.
eo_support
Posted: Saturday, July 28, 2018 12:47:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,258
Great. Glad to hear that it works for you!


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.