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.
Robbe Morris replied to Sivanesh Vanmeeganathan on 01-Jan-15 04:02 PM
You need to read this to better understand the limitations of accessing cookie information across domains:

http://www.codeproject.com/Tips/610537/Browser-Cross-Domain-Explained
Sivanesh Vanmeeganathan replied to Robbe Morris on 01-Jan-15 04:41 PM
Thanks dude.