In my web project setting to turn on httpOnlyCookies is not there. It is false by default. Also there is no place in code where cookie is being set to HttpOnly. However, when I browse to the site I can see that ASP.NET_Session cookie is being passed as HttpOnly. How is it set to HttpOnly?
Share
ASP.NET session cookies are HTTP only, regardless of the
httpOnlyCookiessetting linked to in your question, because this is burned into ASP.NET. You can’t override this.If you dig into the
System.Web.SessionState.SessionIDManagerclass in the System.Web assembly the code for creating the ASP.NET session cookie looks like: