|
 |
asp_web_howto thread: ASP 3.0 Programmer's Reference - Authenticating a user with Basic Authentication
Message #1 by "David Johnson" <david.johnson@d...> on Wed, 18 Apr 2001 16:35:53
|
|
Thank you very much for a brilliant reference book on ASP.
I found the example of using the Session Object to hold a user's username
& password for the purposes of database connection strings to be very good
(pages 1072 - 1074). Is there any way that this can be extended and these
two variables be used to authenticate a user to the actual Web Site
configured for Basic Authentication.
I hope you know what I mean. Essentially I want to capture the user's
credentials once and prevent the default browser prompt for username &
password from appearing, essentially thereby passing the user's
credentials as a Session Object to IIS for Basic Authentication. The end
result being that the users details are captured once and used for ADO
connections and Basic Authentication.
Many thanks
David Johnson
Message #2 by "Brian" <bgmst5@y...> on Wed, 18 Apr 2001 18:04:35
|
|
Hi,
Through IIS you have to set up a folder or the root to force the user to
logon. So you have to remove anonymous access. In IIS, right-click
folder (or root), select Properties, choose Directory Security tab, click
edit button. Then remove checkbox for anonymous access and select the
security setting below (basic auth, integrated windows auth,...). The
user has to have an account set up with appropriate permissions. Then you
can access the username/password with request.servervariables.
Username - Request.ServerVariables("AUTH_USER")
Password - Request.ServerVariables("AUTH_PASSWORD")
Hope this helps,
Brian
> Thank you very much for a brilliant reference book on ASP.
> I found the example of using the Session Object to hold a user's
username
> & password for the purposes of database connection strings to be very
good
> (pages 1072 - 1074). Is there any way that this can be extended and
these
> two variables be used to authenticate a user to the actual Web Site
> configured for Basic Authentication.
> I hope you know what I mean. Essentially I want to capture the user's
> credentials once and prevent the default browser prompt for username &
> password from appearing, essentially thereby passing the user's
> credentials as a Session Object to IIS for Basic Authentication. The
end
> result being that the users details are captured once and used for ADO
> connections and Basic Authentication.
> Many thanks
|
|
 |