How to protect some pages of your site using a password (ASP method).
This sample requires an hosting provider with the Microsoft IIS web server installed.

This method uses Cookies for authentication and doesn't require a DataBase, you'll simply have to add users to the "checkLogin.asp" page (see below).

Used files:

- login.dhe (with .asp extension)
This file contains a simple Form container with two mandatory fields, txtUser and txtPassword. The value of these fields will be sent via POST to the checkLogin.asp page that will check the data and let the user to login to the protected area of your site.

- logout.dhe (with .asp extension)
This file will permit user to logout from the protected area, simply link this file for the logout

- checkLogin.asp
This file permit user to login to the protected area of your site. Edit this file with the Notepad, search the
"Add users here!" string then add users as the sample shows. The user/password is not visible when you'll put the site to the internet ;-)

For example for adding a user named "pippo" with the password "pluto" write the line:
addUser "pippo","pluto"
- inc_security.asp
This file must be included in the pages of your site you want to protect using the password. This file simple check if the user has logged in or the Login page will be shown.

- securemenu.dhe (with .asp extension)
This is the file invoked from the Login page if the user logs into the protected area

Setup your site:

1- Copy the above files into the base folder of your site then customize the "
login", "logout" and "securemenu" pages as you want.
2- Give the .asp extension to the pages you want to protect by a password (by acting on the page properties)
3- Go into the "Scripts/Events" section of that page and in the "Page Top Code" text field paste the code:

<%@ Language=VBScript CodePage=1252 %>
<!-- #INCLUDE FILE="inc_security.asp" -->


This will manage the page password protection ;-)