Internet Explorer中的会话状态问题! [英] Problem with Session State in Internet Explorer!

查看:203
本文介绍了Internet Explorer中的会话状态问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我已经添加了在服务器上生成的动态javascript代码。生成的代码是一个图像文件,其中一些guid作为查询字符串。我使用Handler来创建js响应,同时我为新访问者分配Session唯一值,这样我就可以区分那些已经在网站上冲浪的用户。除了Internet Explorer之外,所有浏览器都会在初始站点的回发期间保存Session,每次为现有客户生成新的Guid。

I have a website to which i've added dynamic javascript code generated on server. Code generated is an image file with some guids as query strings. I use Handler to create js response while at the same i assign Session unique value for new visitor so i can distinguish those from already surfing on site user. All browsers save Session during postbacks on initial site except Internet Explorer which generates each time new Guid for already existing customer.

有什么方法可以修复它吗?为什么会这样?

Is there any way to fix it? Why does this happen?

推荐答案

最后在@CResults和@Alex Key的帮助下我发现了IE块默认情况下是第三方cookie,这是我项目中的一个案例。

At the end with help from @CResults and @Alex Key i've found out that IE blocks 3rd party cookies by default which was a case in my project.

修复就像向处理程序添加p3p HTTP标头一样简单......

Fix was as simple as adding p3p HTTP Header to Handler...

HttpContext.Current.Response.AddHeader("p3p", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");

感谢你们两个人!

这篇关于Internet Explorer中的会话状态问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆