ASP.NET:弹出浏览器窗口和会话Cookie [英] ASP.NET: Popup browser windows and session cookies

查看:185
本文介绍了ASP.NET:弹出浏览器窗口和会话Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摘要:当浏览使用Windows资源管理器中的ASP.NET网站,弹出窗口不从父窗口中的借用会话cookie

SUMMARY: When browsing an ASP.NET website using Windows Explorer, popup windows do not "borrow" the session cookie from the parent window.

联系方式:

我工作的一个ASP.NET网站(.NET 2.0)。我用FormsAuthentication。这是一个要求使用cookies来处理会议。

I'm working on an ASP.NET website (.NET 2.0). I use FormsAuthentication. It is a requirement to use cookies to handle the session.

在一个页面上我有一个按钮。当用户点击它,一个弹出窗口被打开。弹出窗口显示使用会话变量,$ P $从父浏览器窗口pviously设置一个ASPX页面。我一直在测试使用的是IE(6,7,8)和Firefox 2.0的网站。在所有这些浏览器,弹出窗口可以访问相同的会话父浏览器窗口,一切工作正常。

On a page I have a button. When the user clicks it, a popup window is opened. The popup displays an ASPX page that uses session variables, previously set from the parent browser window. I've been testing the website using IE (6, 7, 8) and Firefox 2.0. On all these browsers, the popup window has access to the same session as the parent browser window and everything works ok.

我现在有客户端提出了一个错误,指出该弹出窗口显示错误。查看日志文件,我可以看到,这是一个NullReferenceException此刻的弹出页面尝试访问会话变量。与客户交谈,他说,他打开了主站的Windows资源管理器!

I now have a bug raised by the client, stating that the popup window displays an error. Looking at the log file, I can see that it is a NullReferenceException at the moment the popup page tries to access the session variables. Talking with the client, he said that he opened the main website in Windows Explorer !!!

我已经成功地重新建立一个试验机在这个问题上,看到弹出使用一个新的会话。

I've managed to recreate the issue on a test machine and saw that the popup is using a new session.

本机必须安装Win XP的一个IE6!随着IE7的网站工作正常。

The machine must have Win XP an IE6 installed ! With IE7 the website works ok.

推荐答案

在这里我怀疑的是,从Windows资源管理器打开时(不,我完全明白你的意思),正被发回的会话cookie不存储在任何位置,因此不适用于弹出窗口,包括其请求。我不看你怎么实现这个愿望。这难道不是可以告诉客户,这意味着访问不被支持的应用程序?

My suspicion here is that when opened from Windows Explorer (not that I fully understand what you mean by this), the session cookie that is being sent back is not stored anywhere and thus not available for the pop up window to include with its request. I don't see how you can get around this. Is it not possible to tell the client that this means of accessing the application is not supported?

这篇关于ASP.NET:弹出浏览器窗口和会话Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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