In this article I will show you how to authenticate users so as to protect pages from being
seen without permission. It uses a set of ASP files that will be included to each page that needs
In the example the authetication occurs with a couple of
but in real world it should be done using a table or a COM component.
These are the necessary asp files with a explanation of its use:
||This file ask for the userID and password
||This file checks if the userID and password are OK. If so it redirects
to the correct page, otherwise it redirects to the Access Denied page
This is the file with the Access Denied message, nothing more
||To be able to redirect to the right page after the login I gave each
page a unique identifier. So this file has the list of pages and it's
identifier. The URL is retrieved from the function
||This file must be included in each page that needs protection. Before
its inclusion an identifier called nURLID must be declared with
the value of the identifier for this page (see Pages.asp).
To see it working click here
More information about include files can be found typing
"#include" on the Index page of MSDN.