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
  • 29,197
  • 4
  • 84
  • 98
J.Y.527
  • 171
  • 6

0 Answers0