asp.net - C# - HttpClient is not sending any cookies -


i developing 2 websites names www.web1.com , www.web2.com. in web1 saving http cookie below

 httpcookie authcookie = new httpcookie(appconstants.cookie.auth_cookie);  authcookie.path = "/";  authcookie.value = "value1";  response.cookies.add(authcookie); 

now want read cookie in second website i.e. web2. trying read using httpclient below

 httpclienthandler handler = new httpclienthandler();  handler.cookiecontainer = new cookiecontainer();   httpclient client = new httpclient(handler);  response = client.getasync("http://www.web1.com").result;   var cookies = cookies.getcookies(new uri("http://www.web1.com")); 

this doesn't returns cookies, checked via fiddler well. if directly open www.web1.com , check fiddler sends cookie.

please see missing cookie not returned httpclient.

thanks,
sb

not sure if work in case authcookie.domain = "ip/domain"; should job you.

having said there other alternatives query string , page post on other domain might interest you.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -