Web Development
5 replies
by esadacca
You probably don't want to give IUSR_MachineName change permissions to the folder. Instead, force an authentication (see VBScript ASP below) and give the individual user the appropriate rights.
sub ForceAuthentication()
dim i, intWhackLoc
if Request.ServerVariables("LOGON_USER") = "" Then
Response.Status = "401 access denied"
else
strLogonUser = ucase(Request.ServerVariables("LOGON_USER"))
intWhackLoc = inStrRev(strLogonUser,"\")
if intWhackLoc <> 0 then
strLogonUser = right(strLogonUser, len(strLogonUser) - intWhackLoc)
end if
end If
end sub
by kirkk
by esadacca
Actually, you don't need that part. I just quickly copied the code from one of my pages. The important part is the first few lines. They check the server variables for a logon; if it's not there, they send back a 401 and force the browser (user) to log in.
Here's the revised code:
if Request.ServerVariables("LOGON_USER") = "" Then
Response.Status = "401 access denied"
end If
Once the visitor has been authenticated, FSO follows the user's permission levels on the server, rather than IUSR's.
Be aware that if a "guest" visitor authenticates (this code will allow it), FSO may still not have the appropriate permissions and throw a permission denied.
Sorry for the confusion (and extra code!).
by kirkk
by kirkk
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending