问题描述
我有一个列表框控件的aspx页面。列表框是从是从当一个服务页面加载检索集合填充。当用户从列表框中页面回,重装前加入检索的对象到会话选择一个项目。在重装我用,而不必再次调用该服务的会话对象。
I have an aspx page with a listbox control. The listbox is populated from a collection that is retrieved from a service when the page loads. When the user selects an item from the listbox the page posts back, adding the retrieved objects to the session before reloading. On the reload I use the session objects instead of having to call the service again.
直到我从一个iFrame内访问的页面这一切工作正常。当页面中的iframe(会话[嗒嗒]为空),不提取的Session对象。这code完美的作品,当页面是不是在一个iFrame。
This all works fine until I access the page from within an iFrame. The Session objects are not retrieved when the page is in an iFrame (Session["blah"] is null). This code works perfectly when the page is not in an iFrame.
我使用IIS7和Windows Server 2008有什么我需要在国际空间站做,允许在一个iFrame中使用Session变量?有谁知道别的,可能会导致这种情况发生?
I am using IIS7 and windows server 2008. Is there anything I need to do in ISS to allow Session variables to be used in an iFrame? Does anyone know of anything else that may cause this to happen?
谢谢,
尼尔
推荐答案
其实没关系,我只是清除了文件 C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ V2.0.50727 \\临时ASP.NET文件
并重新启动IIS,这是所有工作
Actually never mind, I just cleared out the files in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
and restarted IIS and it was all working
这篇关于当页面在iframe会话变量不保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!