Securing Webpages

Results 1 to 2 of 2

Thread: Securing Webpages

  1. #1
    Join Date
    Dec 1969

    Default Securing Webpages

    Hello,<BR>I am a beginner trying to set up password protected sites using ASP. I was looking at the link,<BR> on how to set this up. I read through the pages and I am still a little confused. We use FrontPage and I am trying to figure out how to implement these pages. Should the .asp pages be freestanding pages that are linked to our password pages or is this text contained at the beginning of these pages. How does this code fit into html code. <BR><BR>I am only looking to secure a few pages and security is moderately important. I would need something to<BR>prevent users from typing in the URL. The article had documented this by including code that verifies you logged on each time anew page is open. This should be satisfactory.<BR><BR>Could you give me a few recommendations how to include the .asp code into the web. Thanks a bunch, I really appreciate<BR>any insight you can lend.<BR><BR>Brock

  2. #2
    Join Date
    Dec 1969

    Default RE: Securing Webpages

    Set up a table in a DB that containes usernames and passwords. <BR><BR>have a front page for e.g. default.asp that contains a form with inputs for these in a form. This submits to a page called say checkpass.asp which runs a script to confirm whether that username and password exist a sample of this would be <BR><BR>struser = request.form("username")<BR>SQL = "select strpassword from logins where username = &#039;" & struser & "&#039;"<BR>userrs = myconn.execute("SQL")<BR><BR>Then put in an IF Then statement to check if the request.form("password") = userrs("strpassword")<BR><BR>If it does then set a session variable to = allow like so<BR><BR>Session("userloggedin") = True<BR><BR>and redirect to your home page.<BR><BR>If it is not = then redirect to the log in page again.<BR><BR>Then all you have to do is add the code to the top of every page like so<BR><BR>IF session("userloggedin") &#060;&#062; True Then <BR>Response.Redirect("default.asp")<BR>End IF<BR><BR><BR>This is a very short explanation of the way it works and the system I use is much more in depth. Look at articles around the net to learn much more.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts