Access httponly cookie from server side (ASP.NET 4.5)
<p>I am trying to retrieve an httponly cookie over https from code behind and then set to session variable to retrieve from web form page. The code is on the same domain.</p>

<pre><code>HttpCookie cookie = Request.Cookies["CookieName"];
            if (cookie != null)
            {
                string token_value = cookie.Value.ToString();

                Session.Add("TestCookie", token_value);
            }
</code></pre>

<p>In my web form, I try to retrieve the session variable, but value is null.</p>

<pre><code>&lt;script type="text/javascript"&gt;
        var cookie_value = '&lt;%= Session["TestCookie"] %&gt;';
        alert(cookie_value);
    &lt;/script&gt;
</code></pre>