Jump to content

Recommended Posts

Posted

Sometimes I cannot retrieve cookies from the CookieContainer. The problem is in the way the class sets cookies or in the way it retrieves those cookies. Either way, the class is so restricted that I didn't find any workaround.

 

Is there an official place to post the bug?

 

Here is some simple lines to replicate the bug:

Uri uri = newUri(http://my.opera.com/);

//using CookieContainer.Add

CookieContainer cc = newCookieContainer();

Cookie c = newCookie("opera_test", "12345", "/", "my.opera.com");

cc.Add©;

Console.Write(cc.GetCookies(uri).Count); //Works!

//using CookieContainer.SetCookies

cc = newCookieContainer();

cc.SetCookies(uri, "opera_test=12345;path=/;domain=my.opera.com");

Console.Write(cc.GetCookies(uri).Count); //Doesn't work!? CookieContainer.Count shows 1 cookie but where is it? Cannot retrieve it using any variant of opera uri.

Any help appreciated.

Thanks!

 

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...