|
Rank: Newbie Groups: Member
Joined: 10/28/2014 Posts: 3
|
I have a very simple winform with a EO.WebBrowser on it reading a specific webpage. This webpage stores its settings in a cookie which is set to expire 1 year in the future. But when I restart my application this cookie appears to be lost. So, my question is this:
Do I need to do something active to persist this cookie in my application between restarts or, if that is not the case, how do I troubleshoot the state of this cookie in EO?
It really does appear to be a daft question but I cannot locate any information on this in the documentation.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
EO.WebBrowser persists cookies the same way as a regular browser. Whether a cookie is to be persisited is set on the cookie, not on the browser. So you may want to check that.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/28/2014 Posts: 3
|
Well, that is sort of the problem. It *does* work in other browsers. It is only in my EO application where the cookie is not being recognized. I will try and see what it looks like on the server tomorrow.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
The only reason that EO.WebBrowser may not persist a cookie that other browser would persist is that the location where EO.WebBrowser saves cookie changed after you restart the application. This can happen due to various reasons:
1. By default the cookie location has to do with the user currently logged in. So if you switch user, then the cookie location will change; 2. If you update EO.WebBrowser to a different version, the cookie location will change; 3. If you set cookie location explicitly (by setting EngineOptions.CachePath) in your code every time the application starts;
So you may want to check these scenarios. If none of those is the problem, you can put the page online and we will be happy to test it here.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/28/2014 Posts: 3
|
Ah, that was it. The application is Click-Once published which may have something to do with it. Anyhow; I simply set a specific cache path and now it runs smooth as butter. Thank you and have a nice weekend!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Glad to hear that! Please feel free to let us know if there is anything else.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 1/12/2015 Posts: 81
|
I've set the EngineOptions.CachePath to a fixed location and it works well. But it's not retaining classic ASP session cookies.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
BenjaminSimpson1989 wrote:I've set the EngineOptions.CachePath to a fixed location and it works well. But it's not retaining classic ASP session cookies. Classic ASP is a server side technology --- which means it is completely unrelated to the client browser engine. So if cookie works for other sites but not your ASP site, then its almost certain the problem is on the ASP site.
|
|