cptkoi
11-05-2002, 04:55 PM
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 ?
:confused:
ServerCorps
11-10-2002, 07:47 PM
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
RackMy.com
11-10-2002, 07:58 PM
Are you talking about HTTP or FTP?
cptkoi
11-11-2002, 03:42 PM
http - i want them to follow a link - get asked for username/password then be authenticated and forwarded to there area/information.
ServerCorps
11-11-2002, 03:57 PM
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