Is there a way to get the HttpWebRequest
object to take the set-cookie header into account when being automatically redirected to another page through the AllowAutoRedirect
feature? I need it to maintain the cookie information across redirects; I'd rather not have to implement the redirect myself if the framework can do this for me. This must be a common request since most login pages I've seen usually do this.
I know to make separate requests (ie. different HttpRequest objects) work with cookies, you need to set the HttpRequest.CookieContainer property on both requests to the same instance of a CookieContainer. You might need that for this case as well.
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