In System.Net.CookieContainer
if I want to remove all cookies under a domain name, how?
You could do something like this.
CookieContainer c = new CookieContainer();
var cookies = c.GetCookies(new Uri("http://www.google.com"));
foreach (Cookie co in cookies)
{
co.Expires = DateTime.Now.Subtract(TimeSpan.FromDays(1));
}
This will expire all cookies for the domain you specify.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With