c# - .NET 4.0 Cookie Container bug with subdomains -


I am working on a project that removes content from a page on Amazon.co.uk. I can successfully submit the login form and I keep the cookies in a cookie cookie, everything looks normal and I'm successfully logged in to the site However, when I browse some pages it appears logout, The login screen is indicated again. I can never access the page program

I think I can fall into the bug report here, which is related to the cookie container with Netmeet.NET 4:

There are two functions on this link:

Workaround # 1: Version = 1 After receiving the response with cookies, add them as new cookie container> as plain cookies, and to make requests after that Use this new container.

Solution # 2: After receiving a response with the version = 1 cookies for the parent domain, add them to the same> once again for cookie cookies, subdomains.

I'm not sure if I understand how to implement it, did anyone have experienced it earlier that can share a solution with me? I am running .NET 4.0.

Thank you, Colin.

I found the solution to recreate the cookie constant with each request and modify the version 1 cookies. Was done for:

  CookieContainer newCookies = new CookieContainer (); Add new cookies (new urie ("https://www.amazon.co.uk/"), new cookie {name = c. Name, version = 0, comment = c. Comment, commentary = c. Comment, leave = C.Discain, domain = C. domain, expired = C. Exquisite, Expire = C. Excerpts, HTTP = C. HTTP, Path = C. Path, Port = C. Port, Secure = C. Touch , Value = c. Value});  

An annoying bug that is refusing to fix MS seems so hopeful that it helps someone!


Comments