Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP & Global.asp & Session

Status
Not open for further replies.

Glutus

Programmer
Jul 13, 2001
27
0
0
SE
I have a web with a login page. The idea is for the users to login and have access to a number of articles depending on their individual classification. When I try to store their security level in a SESSION("SECURITY_LEVEL") thing, it doesn't work. I've tried modifying the GLOBAL.ASA file, but without any luck. I could use COOKIES, but would rather not since not all my users allow this. Please, help me if you can.
 
For each page you want to apply the security rule, you have to check the session variable (SECURITY_LEVEL, assuming you have assigned it a value after a user successfully logged in). This should work.

Good luck!
 
Try to use like this

global.asa file

sub Session_OnStart
Session("SECURITY_LEVEL")="denied"
end sub

login.asp
sub Login
'put your login code here
end sub

if Session("SECURITY_LEVEL")="denied" then
call Login
end if

u have to put this code in every file u want
<!--#include file=&quot;login.asp&quot;-->

This is an simple example of using user access...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top