The HTTPOnly attribute has been added to the session cookie generated by ASP. NET 2.0. this value is hardcoded and cannot be changed via a setting in the application. while this is already ented as a breaking change in the breaking changes document (linked below), it's not clear the types of symptoms you will see in your application, nor is the fix clearly stated.
|
void application_endrequest (Object sender, eventargs e)
{< br> If (response. cookies. count> 0)
{< br> foreach (string s in response. cookies. allkeys)
{< br> If (S = formsauthentication. formscookiename | S. tolower () = "Asp.net _ sessionid")
{< br> response. cookies [s]. HTTPOnly = false;
}< BR >} |
You cocould also roll this into a custom httpmodule to apply it when SS multiple applications if necessary.
Link to breaking changes document:
Http://msdn2.microsoft.com/en-us/netframework/aa497240.aspx
Http://msdn.microsoft.com/netframework/programming/breakingchanges/runtime/aspnet.aspx
Link to HTTPOnly attribute:
Http://msdn2.microsoft.com/en-us/library/system.web.httpcookie.httponly.aspx
Link to httpmodule documentation:
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/cpguide/html/cpconhttpmodules. asp
Special thanks to Shai Zohar for helping isolate the issue as well as testing the above solution.
Filed under: ASP. NET