FrontPage World - Microsoft FrontPage Information

FrontPage 2002 | FrontPage 2003 | Web Templates | FrontPage Hosting
  What's New | Themes | E-Commerce | Tips | Forum | Newsletter | Search

 
Everything about Microsoft FrontPage in One Simple Place on the Web
Password Protection and FrontPage, Part 1

A Guest Tip and Trick from Andrew Wasson - andrew@lunadesign-studios.com

I have done some password protection schemes with JavaScript with pretty good results but it only really works for the link, and anyone can bookmark the pages and come back whenever they want.

If the site you are running is on a UNIX server you can incorporate UNIX password protection. If you are running a Microsoft Server the easiest approach for password protecting that I have found does involve some coding, but it’s not that difficult.

Prerequisites:

You will need to have a server running FrontPage extensions and it also must be capable of supporting ASP files (Active Server Pages).

The username and password will be stored in a MS Access database and the server must support this as well. If you have a copy of MS Office running on your machine you are laughing.

The easiest way to develop the password protection on your computer is to run either PWS 4.0 with Windows 98 or IIS with a version of NT or Win2K. Both of those servers support ASP and FrontPage Extensions. If you are developing this on the live server, once you have finished and tested the site you are done. If you are working on a development server all you have to do is publish to your production server when you are done. If this makes sense then forward on.

It looks like a lot of info but it really isn’t.

Step 1 admin.asp

This page allows you to add user names, and passwords remotely to the Access Database

I usually open the site live on the server in FrontPage by using File – Open Web… then choosing the http://nameofthesite

Ok. Open up your web in FrontPage and create a new page in the main (root) directory. Rename the new page admin.asp The asp extension tells the server that it is an Active Server Page and that it will more than likely have some scripting that needs to be done on the server before it goes to the browser. The reason this one is renamed an ASP is because you will also want to use the password protection on it, and that requires processing on the server.

Create a form with two one-line text fields one for username and one for password.

Right click the text field for username and click Form Field Properties in the Name: field type in "name" without the quotation marks (Make sure you use lower case). Right click the text field for password go to Form Field Properties and in the Name: field type in "password" also without the quotation marks.

Ok you are almost done with this page.

In the form right click your mouse and:

1. Select Form Properties.

2. Select Send to Database

3. Click on Options

4. Click Create Database

FrontPage will create an Access database called admin.mdb and will pace the results of your admin.asp form in the table called Results.Click Ok… Click Ok… and then you should be back at the page view in FrontPage. You can save this file now. It’s pretty much finished for the time being.

If you are working on a live site you can try this page out by typing the url of the page and entering a username, and a password. If you are working in a file folder on your machine you will need to publish this page to use it. I strongly recommend working in the site live for this type of work.

Ok test it out. After you enter a username and a password you will be directed to a confirmation page that tells you that you have just entered a username a password, and clicked the submit button. If you don’t believe it you can look in your web directory where you will find a directory called fpdb inside is the database, and you will find your username and password in a table called results.

Now that you have a place to store your password, and the ability to create as many as you need you need to create some applications to use this.

End of part 1.  Click here for part 2.

 

 

 

 

Training | Tips and Tricks | Site Map | Suggest a Link
© 1998-2003 Colligan.com, Inc. | info@frontpageworld.com

Click Here!