In This Site

Home
Free News Updates
Using Microsoft FrontPage
Cascading Style Sheets
Database Fundamentals
FrontPage & Access
FrontPage Navigation
Website Security
Solving Problems
Learning SQL
Code Samples
Promote Your Site

In This Section

Session Based Login
Cookie Based Login

 

 

 

Take Your Web Site to New Levels

Securing Your Website behind a Password

Just because you put your database online, doesn't mean that you want the world to have access to it. In today's world, success is often determined by the amount of data you control. You may feel the need to place it online, but you may also want to control who has access to it.

There are many different ways and reasons to secure your users.

  • You may have a section of your site that you wish to protect with a password that will be common to all users.
  • You may want to provide a registration page that will create individual accounts to a single password protected area of your site. You may also want the account to expire after a certain time (for instance with subscription sites).
  • You may need to allow individual account to access only the records for which they have been given access rights.

I've tried numerous techniques. Most required custom coded active server pages that were difficult to maintain and even more difficult for novices to reproduce.

In this section, I'll go through several techniques that provide solutions to each of the above situations. I'll also provide some third-party solutions that can take the entire workload off your hands. Select the option that best fits YOUR situation.

Password Protect a Directory or Sub-web

Protecting a single directory represents the simplest password protections scenario. There are many ways that you can accomplish this. Sometimes, the easiest way is to use the administration page provided as part of your hosting plan. In many cases, your web host will provide the ability to set folder permissions. You can set the permissions to allow one or more specific users or groups to access the files. When users click a link within the protected directory they will be confronted with a username and password prompt. An incorrect username or password will result in a "Page Cannot Be Displayed" message.

Password Protect a Directory after Using a Registration Form

If you want users to be able to register online and then be able to access the password protected section, you'll need to accomplish several tasks:

  1. Provide a Registration Form that is NOT behind the password protected area of the site. This form will be saved to a database so that their registration details are available later.
  2. Provide a login form that will check their username and password against the database. Ideally, you will have these saved into a session object so that it remains available for as long as they keep their browser open.

These tutorials are part of an upcoming training course called "FrontPage Magic - How To Create A Database Driven Website For Non-Programmers". Stay tuned for more details on this exciting new product.

Send your tips to .
All materials Copyright © Ward Cameron All Rights Reserved