user1547039
user1547039

Reputation:

CefSharp SetCookie does not work

I'm a newbie to .NET and CefSharp. In general it loads page great, but I can't figure out how to work with cookies. I use 0.12 version of CefSharp, however I have exactly the same issue on 1.19. I'm setting cookies manually in my application, but server doesn't see them, is there some kind of bug out there or I miss something? I set them before loading URL after I got Initialized event like this:

       CEF.SetCookie(@"http://localhost/CookiesShow/", @"localhost", Name, Value, @"/CookiesShow", false, false, false, Expires);

I can see in the debug that cookies are being set, however my webserver does not receive them. I also tried running "nc -l 80" and I don't get those cookies. Did I miss something basic?

Upvotes: 2

Views: 2508

Answers (1)

julian guppy
julian guppy

Reputation: 411

Although I do not have a direct answer for this - i wanted to comment rather than answer..., I wanted to volunteer something that might help you in terms of debugging. In case you have not already done it. Using fiddler proxy whilst you have your cef session running. This will capture the session and look at the headers of each of the post backs it might help determine if the problem is in cef or your app. I have used fiddler http://www.fiddler2.com/fiddler2/ to help me with similar problems. I am interested in the answer to this question because I may well be needing to drop cookies in cef

Upvotes: 3

Related Questions