System.Net vs. System.Web namespaces and Cookie/HttpCookie?
Posted on 2004-09-10
I have a C# assembly I am writing for the client side. I can use the System.Net namespace to request a webpage, and can get the CookieCollection from the HttpWebResponse object. However the cookies I get are System.Net.Cookie not System.Web.HttpCookie. And this is a problem because the Cookie class only exposes a Value property, not Values like the HttpCookie does. So when I need to read multiple cookie key/value pairs in my application I cannnot.
Is there any way to work around this?
In my assembly only the first 3 classes of System.Web are available. Do I have a bad installation, or is because I am writing a Windows Form application not a web form application?