asp_web_howto thread: NT Logon Authentication
Message #1 by dean.hastings@u... on Wed, 22 May 2002 09:55:38
|
|
I have to enter NT username and password 3 times before the page is opened.
Does anyone know why this is?
I would like to be prompted once only. Here is the code I am using.
<%
Response.Status=("401 Access Denied")
Response.Write "Logged on: " & Request.ServerVariables("LOGON_USER")
Response.end
%>
Message #2 by "Jeroen Diderik" <jeroen@i...> on Wed, 22 May 2002 11:22:42 +0200
|
|
You always prompt the user.. Which has a try limit of 3.
Write it like this:
If Request.ServerVariables("LOGON_USER") =3D "" Then
Response.Status=3D("401 Access Denied")
Else
Response.Write "Logged On:" &
Request.ServerVariables("LOGON_USER")
End If
Goodluck,
Jeroen Diderik
-----Original Message-----
From: dean.hastings@u... [mailto:dean.hastings@u...]
Sent: Wednesday, May 22, 2002 11:56 AM
To: ASP Web HowTo
Subject: [asp_web_howto] NT Logon Authentication
I have to enter NT username and password 3 times before the page is
opened. Does anyone know why this is?
I would like to be prompted once only. Here is the code I am using.
<%
Response.Status=3D("401 Access Denied")
Response.Write "Logged on: " & Request.ServerVariables("LOGON_USER")
Response.end
%>
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
Message #3 by "phil griffiths" <pgtips@m...> on Wed, 22 May 2002 10:31:28
|
|
Try adding Response.AddHeader "WWW-Authenticate", "NTLM" to specifically
request the NT logon details. This, along with turning on both 'Allow
anonymous' and 'NT Challenge/Response' in the Directory Security settings
in IIS should do the job - you shouldn't be prompted for the logon details
at all. It works for me anyway! (I assume this is for intranet?)
HTH
Phil
-------------------------------------------------
> I have to enter NT username and password 3 times before the page is
>opened.
> Does anyone know why this is?
> I would like to be prompted once only. Here is the code I am using.
> <%
> Response.Status=("401 Access Denied")
> Response.Write "Logged on: " & Request.ServerVariables("LOGON_USER")
> Response.end
> %>
Message #4 by dean.hastings@u... on Thu, 23 May 2002 10:09:15
|
|
Thanks for the responses,
I think I may be attempting to do something a little unusual.
Here is the background. My web application is running on an Intranet.
Authentication method in IIS5 is "Integrated Windows Authentication" only.
User A is logged on to their PC and can access restricted pages without
being prompted (Request.ServerVariables("LOGON_USER") verified against a
database table). I would like to give User B the ability to login to web
application through User A browser without logging out User A from PC.
I hope this makes sense!
Dean.
Message #5 by "Jeroen Diderik" <jeroen@i...> on Thu, 23 May 2002 17:39:32 +0200
|
|
Then you will need Basic Authentication enabled.
Goodluck,
Jeroen Diderik
-----Original Message-----
From: dean.hastings@u... [mailto:dean.hastings@u...]
Sent: Thursday, May 23, 2002 12:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: NT Logon Authentication
Thanks for the responses,
I think I may be attempting to do something a little unusual. Here is
the background. My web application is running on an Intranet.
Authentication method in IIS5 is "Integrated Windows Authentication"
only. User A is logged on to their PC and can access restricted pages
without
being prompted (Request.ServerVariables("LOGON_USER") verified against a
database table). I would like to give User B the ability to login to web
application through User A browser without logging out User A from PC.
I hope this makes sense!
Dean.
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
|