471,119 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 software developers and data experts.

Sessions Problem


Hi all, I seem to been having a problem with sessions. I have a session in
the login page

Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value)

which doesn't seem to be visible through out the site. If I use <%
Response.Write(Session("UserLevel")) %> on the login page then it shows that
the session in is present and the correct value. but when I use <%
Response.Write(Session("UserLevel")) %>. on any other page through out the
site it returns nothing
I'm actually wont to use sessions to protect admin pages.

As I am new to sessions, is there anything I am missing?
or can any one point me in the right direction ?

Thanks in advance for your help.

Desperate Paul.
Jul 22 '05 #1
6 1301
http://www.aspfaq.com/2157

--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.


"Paul" <de*******@blueyonder.co.uk> wrote in message
news:P8****************@fe3.news.blueyonder.co.uk. ..

Hi all, I seem to been having a problem with sessions. I have a session in
the login page

Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value)

which doesn't seem to be visible through out the site. If I use <%
Response.Write(Session("UserLevel")) %> on the login page then it shows that the session in is present and the correct value. but when I use <%
Response.Write(Session("UserLevel")) %>. on any other page through out the site it returns nothing
I'm actually wont to use sessions to protect admin pages.

As I am new to sessions, is there anything I am missing?
or can any one point me in the right direction ?

Thanks in advance for your help.

Desperate Paul.

Jul 22 '05 #2
Although no one answered this problem I have managed to solve it myself. The
problem wasn't anything to do with code, but more to do with Zone Alarm
stopping the cookies. No cookie meant that the restricted pages where always
being redirected whether the correct person was logged in or not.

"Paul" <de*******@blueyonder.co.uk> wrote in message
news:P8****************@fe3.news.blueyonder.co.uk. ..

Hi all, I seem to been having a problem with sessions. I have a session in
the login page

Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value)

which doesn't seem to be visible through out the site. If I use <%
Response.Write(Session("UserLevel")) %> on the login page then it shows
that the session in is present and the correct value. but when I use <%
Response.Write(Session("UserLevel")) %>. on any other page through out
the site it returns nothing
I'm actually wont to use sessions to protect admin pages.

As I am new to sessions, is there anything I am missing?
or can any one point me in the right direction ?

Thanks in advance for your help.

Desperate Paul.

Jul 22 '05 #3
> Although no one answered this problem

I guess point #1 on the link I posted when I "answered this problem" wasn't
enough help. :-(
Jul 22 '05 #4
Sorry Paul didn't mean to dismiss you. Point 1 from your link was relevant,
and I did check my browser and the settings where fine. I just didn't use my
common sense and check all my security software, such as firewall,
Spyware/Trojan remover etc.

Thanks

For you help and the fact that had I applied your answer holistically it
would have solved my problem.

Paul.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:OA**************@TK2MSFTNGP14.phx.gbl...
Although no one answered this problem


I guess point #1 on the link I posted when I "answered this problem"
wasn't enough help. :-(

Jul 22 '05 #5
I'm having all sorts of problems with Sessions, I've been using them for
years with out a hitch, all of a sudden the last 6 - 12 months since getting
our new Win2003 server it's all gone shakey!!!

Our development server started life as an NT4 machine and has been simply
upgraded from one operating system to the next, it is now a cross, NT4
Server, Win2000 Server, Win2003 server. All development sites work fine and
under heavy stress. The machine only has 256 Mb RAM with PII processor,
great for stress testing scripts. Our new server is a fresh install P4
Win2003 server with IIS6, I'm getting all sorts of session problems, And
across multiple sites.

Anyone have any ideas, I've switched the server into IIS5 compatibility mode
so it's not that.

Bearing in mind our mismatched server works fine locally.

I think Session recycling is taking place but can't find any evidence of it

Regards Adam
"Paul" <de*******@blueyonder.co.uk> wrote in message
news:QO*******************@fe2.news.blueyonder.co. uk...
Although no one answered this problem I have managed to solve it myself.
The problem wasn't anything to do with code, but more to do with Zone
Alarm stopping the cookies. No cookie meant that the restricted pages
where always being redirected whether the correct person was logged in or
not.

"Paul" <de*******@blueyonder.co.uk> wrote in message
news:P8****************@fe3.news.blueyonder.co.uk. ..

Hi all, I seem to been having a problem with sessions. I have a session
in the login page

Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value)

which doesn't seem to be visible through out the site. If I use <%
Response.Write(Session("UserLevel")) %> on the login page then it shows
that the session in is present and the correct value. but when I use <%
Response.Write(Session("UserLevel")) %>. on any other page through out
the site it returns nothing
I'm actually wont to use sessions to protect admin pages.

As I am new to sessions, is there anything I am missing?
or can any one point me in the right direction ?

Thanks in advance for your help.

Desperate Paul.


Jul 22 '05 #6
> I'm having all sorts of problems with Sessions, I've been using them for
years with out a hitch, all of a sudden the last 6 - 12 months since
getting our new Win2003 server it's all gone shakey!!!


http://www.aspfaq.com/2157

--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.