Results 1 to 5 of 5

Thread: iis login

  1. #1
    Join Date
    Jul 2001
    Location
    UK
    Posts
    137

    * iis login

    I am try to utalise iis 5 to log clients in to folders on my website - i have got the user id an password prompt to pop up - how do i get the server to forward them to there folder upon successfull log in ?

    Koihost - Windows Solutions
    http://www.koihost.com
    --------
    Quality usually costs more!

  2. #2
    Join Date
    Mar 2002
    Location
    Mobile, AL USA
    Posts
    325
    You would need to capture the logged on user name after logging in, and forward them to a dir based on that.

    Request.ServerVariables("LOGON_USER")

    holds machinename\username

    of the current user accessing the page. you could put a default page in the root of the protected dir that got the name of the current user and did a server.transfer based on that username
    Nik Martin
    nfina Technologies, Inc.
    +1.251.243.0043 x1003
    Server Hardware, Storage, and Turnkey systems for Service Providers

  3. #3
    Join Date
    Apr 2001
    Location
    St. Louis, MO
    Posts
    2,508
    Are you talking about HTTP or FTP?
    Mike @ Xiolink.com
    http://www.xiolink.com 1-877-4-XIOLINK
    Advanced Managed Microsoft Hosting
    "Your data... always within reach"

  4. #4
    Join Date
    Jul 2001
    Location
    UK
    Posts
    137
    http - i want them to follow a link - get asked for username/password then be authenticated and forwarded to there area/information.
    Koihost - Windows Solutions
    http://www.koihost.com
    --------
    Quality usually costs more!

  5. #5
    Join Date
    Mar 2002
    Location
    Mobile, AL USA
    Posts
    325
    holds machinename\username

    of the current user accessing the page. you could put a default page in the root of the protected dir that got the name of the current user and did a server.transfer based on that username [/B][/QUOTE]

    Then you'll need to do it this way. If theuser successfully authenticates according to the ACL on the directory, then put a default document (usually default.asp) in the root of that dir that does this (this is pseudocode, it probably wont work as is):

    '***begin default.asp
    dim sUser
    sUser = Request.ServerVariables("LOGON_USER")
    'sUser now holds the useraccount of the person that just
    'successfully logged into this dir, and looks something like this:
    ' MachineName\UserName

    sUser = split(sUser,"\")(1)
    'sUser now holds what was on the right of the \

    server.transfer("http://www.sitename.com/ThisProtectedDir/" & sUser & "/")

    '****end default.asp

    HTH
    Nik Martin
    nfina Technologies, Inc.
    +1.251.243.0043 x1003
    Server Hardware, Storage, and Turnkey systems for Service Providers

Posting Permissions

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