Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/01/2006, 12:33
tammander
 
Fecha de Ingreso: enero-2006
Ubicación: Torroles (Costa der Só)
Mensajes: 1.017
Antigüedad: 19 años, 4 meses
Puntos: 7
Cita:
This script forces a password dialog box to appear by sending a "401 Not Authorized" status code if the user has not already logged in. To access the page, you must have a valid user account on the server.
This script forces a user to authenticate by using Basic Authentication. If you want to force a user to login using NT Challenge/Response Authentication, then replace the Response.AddHeader statement in the script with the following one:

Response.AddHeader "WWW-Authenticate","NTLM"

<%
authUser = TRIM( Request.ServerVariables( "AUTH_USER" ) )
IF authUser = "" THEN
Response.Status = "401 Not Authorized"
Response.AddHeader "WWW-Authenticate", "Basic Realm=""SUPEREXPERT"""
Response.End
END IF
%>
<html>
<head><title>Password Please</title></head>
<body>

<font face="Arial" size="4" color="blue"><b>
Welcome <%=authUser%>!
<br>Feel free to view this page.
</b></font>


</body>
</html>
Hay mas:

http://www.asp101.com/articles/flicks/authtutorial.asp


Un saludo