2

I try to add cookies to a CookieContainer.

Cookie cook1= new Cookie("aaaa", "1111", "/", "abc.com");
Cookie cook2= new Cookie("bbbb", "2222", "/", "abc.com");
CookieContainer cookieContainer = new CookieContainer();
cookieContainer.Add(cook1);
cookieContainer.Add(cook2);

However, I monitor the cookieContainer in debug mode. I found that the value in m_domainTable is [".abc.com"] but not ["abc.com"]. Why there is a "." in the beginning of the domain? and how to remove "."?

Lloyd
  • 28,624
  • 4
  • 82
  • 95
J.Y.527
  • 13
  • 3

0 Answers0