Password Dialog Box   
 
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>

My3C's
perrychicker
It's easy... it's a PSACAKE!
Back | Tell A Friend | Search this Site
1998 - 2014 psacake.com
Version 3.23

Send me One Million FREE Guaranteed Visitors