hspc
May 16th, 2004, 11:19 AM
Hi
I try to restrict access to some pages..
I don't want to use username/password text Input controls,,
instead I want to display the basic authentication dialog but i face a problem reading the username/password that the user inputs :
Response.Clear
Response.Write Request.ServerVariables("AUTH_USER")
if Request.ServerVariables("AUTH_USER")<>"ABC" and Request.ServerVariables("AUTH_PASSWORD")<>"123" then
Response.AddHeader "WWW-Authenticate","basic"
Response.Status="401"
Response.End
else
Response.Write "user=" & Request.ServerVariables("AUTH_USER") & vbCrLf
Response.Write "PWD=" & Request.ServerVariables("AUTH_PASSWORD")
end if
the dialog shows up and i input data but seems that the checking for AUTH_USER and AUTH_PASSWORD is wrong..
please help me with this.
I use IIS 5.0 and basic authentication is enabled.
I try to restrict access to some pages..
I don't want to use username/password text Input controls,,
instead I want to display the basic authentication dialog but i face a problem reading the username/password that the user inputs :
Response.Clear
Response.Write Request.ServerVariables("AUTH_USER")
if Request.ServerVariables("AUTH_USER")<>"ABC" and Request.ServerVariables("AUTH_PASSWORD")<>"123" then
Response.AddHeader "WWW-Authenticate","basic"
Response.Status="401"
Response.End
else
Response.Write "user=" & Request.ServerVariables("AUTH_USER") & vbCrLf
Response.Write "PWD=" & Request.ServerVariables("AUTH_PASSWORD")
end if
the dialog shows up and i input data but seems that the checking for AUTH_USER and AUTH_PASSWORD is wrong..
please help me with this.
I use IIS 5.0 and basic authentication is enabled.