Restrict Access to Pages - Step I
In the last tutorial, Create a Backside Login Page, I showed you how to create a Login page for the back-end of your web site. In this tutorial I will show you how to restrict access to pages in your back-end.
1. Open the backsideMenu.asp page, this is a page that you want to restrict access on.
2. Click on the (+) sign in the Server Behaviors Panel (CTRL + F9) and select User Authentication > Restrict Access to Page. Use the settings below in the Restrict Access to Page window.

3. Save the backsideMenu.asp page.
That is all there is to restricting access to pages. You need to use the Log In User Server Behavior to create the necessary session variables that the Restrict Access to Page Server Behavior looks for.
4. Open the backsideBase.asp page and add the Restrict Access To Pager Server Behavior to it and save the page. We will be using this page later to create new pages for the back-end and want that Server Behavior on it.
As a side note to PWS users, MX writes ASP 3.0 code to the page and PWS will throw up on it. To make it compatible with PWS, do the following.
1. Open the backsideMenu.asp page.
2. Go into Code View by clicking View > Code.
3. Look for the following code:
Session.Contents.Remove("MM_Username")
Session.Contents.Remove("MM_UserAuthorization")
4. Change it to the following.
'Session.Contents.Remove("MM_Username")
Session("MM_Username") = Null
'Session.Contents.Remove("MM_UserAuthorization")
Session("MM_UserAuthorization") = Null
All I did was use an ASP comment, a single quotation ' , to comment out the original lines, and inserted the two new lines.
If you ever move to a server that supports ASP 3.0, then remove or comment out the lines you inserted, and un-comment the original lines.