2.0引进了不让脚本使用的HttpOnly的cookie,,通过客户端脚本执行的某些操作可能会使session丢失。
解决办法:在global.asax中设置HttpOnly属性为Fasle
void Session_Start(object sender, EventArgs e)
{
Response.Cookies["_SessionId"].HttpOnly = false;
}
时间:2021-09-20 01:31:10
2.0引进了不让脚本使用的HttpOnly的cookie,,通过客户端脚本执行的某些操作可能会使session丢失。
解决办法:在global.asax中设置HttpOnly属性为Fasle
void Session_Start(object sender, EventArgs e)
{
Response.Cookies["_SessionId"].HttpOnly = false;
}