DarkKodiak
Programmer
Hi,
I have a page that only certain users should view. Currently, I am able to get the NT login of the user trying to view the page:
Dim login ' user's NT login
login = Request.ServerVariables("LOGON_USER"
login = Right(login, (Len(login) - Trim(InStr(1,login, "\" , vbTextCompare))))
My plan is to have a static text file containing authorized users and get my code to compare the login against the text file. However, I am not having much luck.
Currently, I can not even get this to work:
If login = "john" then
Response.Redirect="unauthorized.html"
End If
So if I login with an NT account of john and try to hit the page a login prompt pops up asking for my login creditals for the web server...if I enter the correct login, I am able to see the page...why is it doing this...
Any Help will be Appreciated....
I have a page that only certain users should view. Currently, I am able to get the NT login of the user trying to view the page:
Dim login ' user's NT login
login = Request.ServerVariables("LOGON_USER"
login = Right(login, (Len(login) - Trim(InStr(1,login, "\" , vbTextCompare))))
My plan is to have a static text file containing authorized users and get my code to compare the login against the text file. However, I am not having much luck.
Currently, I can not even get this to work:
If login = "john" then
Response.Redirect="unauthorized.html"
End If
So if I login with an NT account of john and try to hit the page a login prompt pops up asking for my login creditals for the web server...if I enter the correct login, I am able to see the page...why is it doing this...
Any Help will be Appreciated....