Discussion Locked

Web page security

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I prevent a logged-in user without a certain privilege to go to a restricted page by manually typing the address? I am presently checking session variables to determine if the user has the right access, and if not, to redirect him to the login page. It used to work, but now it doesn't, so I'm looking for a better way. I'm using ASP for the web pages.

3 replies

by jay eckles

It depends on the web server you're using (I assume it's IIS, but it could be Apache running ChiliSoft or even something obscure like vWebServer). In any case, you use your webserver's administrative features to password-protect the document that you're trying to secure. Then, only authorized users will get access. If the page you're trying to secure is an ASP page, then you could check the AUTH_USER Server variable before continuing processing.

Another option is to have one ASP that reads in files and dynamically generates files that the user requests - these files can be stored on the webserver, but outside the root web directory. The ASP can then read and return those files iff the user is authenticated.

You'll have to providemore detail on what exactly you're trying to do if you need a more detailed answer.

Good luck.

Jay Eckles
www.jayeckles.com

This discussion is closed to new replies.