Posted on 1998-12-04
How to get user/password of remote user efficiently?
I know if I write the code below prior to HEAD:
<% Response.Status = "401 Unauthorized"
the browser will prompt a "autherization failed" dialog, then a user/password dialog.
Then, user can input his user/pass. The browser will request the same URL with the user/pass.
1. How do I get the user/password in ASP? I find it in Request.ServerVariables, but get nothing about it.
2. How do I do to remove the "autheriaztion failed" dialog and prompt the user/pass directly? (If I can't, let's forget it...)
I don't want to add the user Account in NT,
because I still need to know which user is accessing my asp , then get the resource about the user from DB.
This is my Code, please help me
' get the user/pass ' ---> how?
' confirm the user/pass with database
If not DBResult("LoginSuccess") then
Response.Status = "401 Unauthorized" ' ---> will prompt the "Autherization Failed. Retry?" Dialog.
' --->How to remove it in the first time?