Dynamic-CD
Search : 
  Powered by FindinSite

ASP Documentation
Overview
• Introduction
• Getting started
• Dynamic-CD wizard
Passwords & Encryption
• Overview
• Example 1
• Example 2
Scripts
• The script language
• Script examples
• Database scripts
Technical details
• Applications
• Built-in objects
• Character Encoding
• Cookies
• Database CDs
• Development tips
• FAQs
• Future developments
• Global.asa
• Network support
• Object registration
• Resources
• ScriptingContext
• Server-side includes
• Sessions
• Technical limits
    
Password protection - example 2
An access control system

An access control system can be implemented using scripts and special  Server  built-in methods supported by the ASP language.

This example grants different levels of access depending on the password entered.

  • gold access allows all pages to be viewed (the password is golden)
  • silver access allows a subset of the pages to be viewed (the password is argent)
  • bronze access allows minimum access.

    All saved passwords are first cleared by  Server.clearAllUsers . Then, specific (userName, passWord) combinations are enabled by  Server.enableUser .
    (Look here for the specification of built-in Server methods).


    You currently have bronze level access.
    To change your access level, enter the password for the level you would like access and press ENTER :
    Enter the access password :

    The controlled web site :

    bronzePage.htm
    silverPage.htm
    goldPage.htm

    View the source for this example.


    © Copyright 2000-2007 PHD Computer Consultants Ltd