ASP.NET - How to share cookie value across domain
Asked By Sivanesh Vanmeeganathan on 01-Jan-15 08:57 AM
In one domain, I coded like below.
var cookie = new HttpCookie("cookieName", "userName");
Response.SetCookie(cookie);
return Redirect("http://www.something.com/");
In another(www.somthing.com) domain,
if (Request != null && Request.Cookies.Count > 0)
{
string name = Request.Cookies["cookieName"] != null ? Request.Cookies["cookieName"].Value : null;
}
but its not working, value always empty.
I cannot use query string. I have to use only cookie.
Please give me a solution.