CMS页ASP.net中的会话问题 [英] session issue in cms pages ASP.net

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

问题描述

你好朋友,

我有一个具有CMS功能的网站.我已经将sessions 用于security 用途

hello friends,

I have a web site with CMS functionality. I have used sessions in it for security purpose

(i.e- my every sub page which is opening inside a frame in main page, will check whether user has signed in or not and if he is not signed in then it redirects him to sign in page.  For that i used to store users id in session after sign in).



我的问题是



My question is

"I have used to check sessions in page load and i did not used Global.asax file for sessions." will it affect my web site.



现在,当我在框架中打开某些页面使用CMS功能时,它会清除会话并重定向到登录页面.

我检查了我的代码以确保它没有清除会话,但是我没有发现清除会话的任何内容.

谁能帮我解决这个问题.

提前谢谢.
:-)



Right now when i use CMS functionality for some pages opening in frame it clears my session and redirects me to sign in page.

I have checked my code to ensure that it is not clearing my session but i did not found any thing which clears session.

can anybody help me to resolve this problem.

Thanks in advance.
:-)

推荐答案

始终最好对页面的页面加载进行会话检查.如果您使用的是母版页,则可以对母版页的页面加载"进行会话检查.

如果您使用Asp.Net的 OutProc 会话管理模式,则 Global.asax 会话事件不支持.

如果您在IFrame中遇到会话清除问题,则可以参考以下链接.

http://weblogs.asp.net/coltk/archive/2010/10/13/session-lost-in-iframe-p3p-issue.aspx
It is always better to keep Session check on Page Load of the Page. If you are using Master-Page then you may keep your Session check on Page Load of Master-Page.

Global.asax Session-Events does not support if you use OutProc session management mode of Asp.Net.

If you are facing problem of Session clearance in IFrame then you may refer below link.

http://weblogs.asp.net/coltk/archive/2010/10/13/session-lost-in-iframe-p3p-issue.aspx


如果您使用InProc存储会话状态,请检查工作进程数-如果将其设置为多个,则很有可能会丢失会话状态.
您正在使用哪个版本的IIS/ASP.NET?
If you are using InProc to store session state, check the number of worker processes - if this is set to more than one, then there is a good chance that your session state can be lost.
Which version of IIS / ASP.NET are you using?


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

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