i have created httpclient in c#
client = new httpclient(handler); the handler this
var handler = new httpclienthandler { cookiecontainer = cookiecontainer, automaticdecompression = decompressionmethods.gzip | decompressionmethods.deflate }; i send requests in site, let's xyzevents.com. receive responses normally, store cookies receive "set cookie:*" commands, works good.
however, after try communicate site xyz.com. in order that, must send requests, using cookies stored xyzevents.com earlier. httpclient can't that, because sees host different xyzevents.com.
is there way bypass check, , send requests no problem?
i don't think there's anyway "disable" check. think it's httpclient ends deciding cookies should sent, not container. , in end, security risks happen sending random cookies anywhere pretty large.
with that, loop through cookies received xyz.com, create them manually domain changed same values. add them new collection sent xyzevents.com.
Comments
Post a Comment