Results 1 to 6 of 6

Thread: ASP Script for password protecting a directory.

  1. #1
    Join Date
    May 2003
    Posts
    896
    Rep Power
    0

    Default ASP Script for password protecting a directory.

    Any one have personal scripts or a personal script for passwording a directory on a website?

    Could the code be posted please.

  2. #2
    Join Date
    Jun 2003
    Posts
    277
    Rep Power
    0

    Default Re:ASP Script for password protecting a directory.

    I kinna edited a borrowed script from the site below re: password protected web pages... maybe it will help.

    Let me knwo if anything

    http://www.js-x.com/asp/login.php3

  3. #3
    Join Date
    Feb 2003
    Posts
    3,184
    Rep Power
    0

    Default Re:ASP Script for password protecting a directory.

    hmm..you can't password protect a directory with ASP. Most likely you are talking about password protecting a file or a webapplication? Password protecting a directory would have to be done in the windows/IIS security settings or the (.htaccess file for apache)

  4. #4
    Join Date
    Jul 2002
    Posts
    818
    Rep Power
    0

    Default Re:ASP Script for password protecting a directory.

    [quote author=owen link=board=18;threadid=1130;start=0#msg12959 date=1059086202]
    hmm..you can't password protect a directory with ASP. Most likely you are talking about password protecting a file or a webapplication? Password protecting a directory would have to be done in the windows/IIS security settings or the (.htaccess file for apache)

    [/quote]

    OR, you could do a poor man's password protection.
    Take the URL from whichever system variable holds that value
    Parse it to separate the filename from the directory path and then take the right most directory (break it up using '/'s)
    Using some data value (database, flat file, hardcoded) compare the directory that you've separated with the value
    If there's a match then give an error message or prompt the user for login information.

    With a little massaging the above method can be used to password protect a directory and it's all script level. I can easily picture how that could be implemented in PHP, I'm not totally up on my ASP syntax and as such am unable to give you the code.

  5. #5
    Join Date
    Jun 2003
    Posts
    277
    Rep Power
    0

    Default Re:ASP Script for password protecting a directory.

    Devnull.. Got thru???

  6. #6
    Join Date
    Aug 2002
    Posts
    48
    Rep Power
    0

    Default Re:ASP Script for password protecting a directory.

    Enjoyed your post.




Posting Permissions

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