Discussion Locked

Add security to a selected webpage?

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi

would anyone please point me to some reference source/source code as to how I can add security to
allow selected individuals to view a particular webpage... I am currently constructing a website for my MIS project and I am green at this.Please help.
thanks

1 reply

by azoric

I can't think of any references off the top of my head, but here are a few ideas to get you in the right direction:

1. password protect the folder.
This pops up a login box when anyone clicks on the link to a page in that folder.

2. Using ASP and the Session Object create a login page then put a login page at the front of your site with the following algorithm:

--- this is a wrapper to secure your pages ---
if session("Mysessionvar") <> "Active" Then
response.redirect notallowed.asp
End IF

note: You'll have to set the session variable to active in the login page.

--- login page using a form post ----

IF (Request.Form("password")="password") AND (request.form("username")="username") THEN
Session("mySessionVar") = "active"
Response.redirect("list.asp")

This discussion is closed to new replies.