Unable to find cookie that was set a request ago
<p>I am trying to develop a simple single sign on solution using ashx file for setting/deleting cookies. .Net 4.0, C#.
I am making a web request (from sitea.com/) to an ashx resource (on a different domain siteb.com/file.ashx) to set a cookie, then I make another request (from sitec.com/) to the same resource (at siteb.com/file.ashx) to see if the same cookie exists. Unfortunately, it comes back as null. When I fiddle it, I can see cookie being there (in request/response headers on siteb.com) on both occasions.</p>

<p>What I don't understand is, how can it be not available via code. I tried using context.Request.Cookies (context comes from public void ProcessRequest(HttpContext context) method), HttpContext.Current.Request.Cookies, also on Response, but no success.</p>

<pre><code>HttpCookie AuthCookie = context.Request.Cookies["SiteCookie"];
</code></pre>

<p>PS: I am writing code on all ends, that is making requests and checking cookie validations. Any idea what could be the problem?</p>
