Hello everyone.
So I've been working on an small tool, that is using httpwebrequests, its not a bad so far I've got login function and list view loading data from site.
But problem is now cookie container so i can do other things than just loading, like editing data.
Uri is subdomain so no www. in it also its https.
When i try to use:

CookieContainer cookies = new CookieContainer();
request.CookieContainer = cookies;

Nothing actually happens, container is still empty? So i cant reuse cookie on new function.. Any ideas?

Thank you for your time and help!

1 Year
Discussion Span
Last Post by pritaeas

And the code agrees it should be zero. I take it there's more code but I respect your need to keep it under wraps.


Code is pretty big, problem is that everything works well except cookies, cookies are not saved into container as they should.
I've found on google that cookiecontainer has bug working on subdomains so it doesnt save automatically cookies, thats why i posted here asking about solutions if someone has one?


Have you tried stripped down code using only webrequest with the cookiecontainer on a regular domain, so you know it works? Or does it always fail, on any domain?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.