Click here to Skip to main content
16,019,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.


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.
:-)
Posted
Updated 9-Dec-11 9:13am
v2

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
 
Share this answer
 
Comments
RaviRanjanKr 9-Dec-11 9:14am    
My 5+
saj_21 9-Dec-11 10:06am    
Thanks RaisKazi.
I tried the given code but it did not work. Still have same problem.
Monjurul Habib 9-Dec-11 15:12pm    
5!
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?
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900