Window authentication

W

Wzaq

Dear Expert,

I want to use window authentication in my asp page. This code allow me to do that but i just need a few user in the server can access this page. Isn't I need to configure at IIS?.
<%
If Request("REMOTE_USER") = "" Then
Response.Status = "401 Unauthorized"
elseif request("REMOTE_USER") <> "" then
response.write Request.Servervariables("REMOTE_USER")
username = Request.Servervariables("REMOTE_USER")
%><HTML><HEAD><title>Attachments</title></HEAD><BODY bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" vspace="5" border="0"><h2><strong><font COLOR="blue">Weekly Forecast and Production Plan Report</font></strong></h2><center><table width="400" border="0" cellspacing="0" cellpadding="1"><tr align = "left"><td bgcolor="#CEE7FF" class="header"><b>Attachment</b></td></tr><tr align = "left"><td bgcolor="#f0f8ff" class="bodytext2_nojustify">Kindly please browse the file that you want to attach. You are allowed to attach <b>ONE file at one time only<b>. </td></tr><tr align = "center"><td bgcolor="#f0f8ff" class="bodytext_12black">&nbsp; </td></tr><form enctype="multipart/form-data" action="uploadfile_process.asp" method="POST" name="frmUpload2"><tr align = "center"><td bgcolor="#f0f8ff" class="bodytext_12black"><input TYPE="File" SIZE="30" MAXLENGTH="100" NAME="docFile"></td></tr><tr align = "center"><td bgcolor="#f0f8ff" class="bodytext_12black">&nbsp; </td></tr><tr align = "center"><td bgcolor="#f0f8ff" class="bodytext_12black"><a href="#" onclick="attach();" ><input name="button" TYPE="button" Value="Attach"></a>&nbsp;
<input name="button" TYPE="button" onclick="location.href ='javascript:history.go(-1)'"; Value="Cancel"></td></tr></form></table><%
end if
%>
 
K

Ken Schaefer

Change the NTFS permissions on your files. Give the users that you want to
allow access RX permissions on the web files. Remove other users.

Cheers
Ken

: Dear Expert,
:
: I want to use window authentication in my asp page. This code allow me to
do that but i just need a few user in the server can access this page. Isn't
I need to configure at IIS?.
: <%
: If Request("REMOTE_USER") = "" Then
: Response.Status = "401 Unauthorized"
: elseif request("REMOTE_USER") <> "" then
: response.write Request.Servervariables("REMOTE_USER")
: username = Request.Servervariables("REMOTE_USER")
: %><HTML><HEAD><title>Attachments</title></HEAD><BODY bgcolor="#ffffff"
text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
vspace="5" border="0"><h2><strong><font COLOR="blue">Weekly Forecast and
Production Plan Report</font></strong></h2><center><table width="400"
border="0" cellspacing="0" cellpadding="1"><tr align = "left"><td
bgcolor="#CEE7FF" class="header"><b>Attachment</b></td></tr><tr align =
"left"><td bgcolor="#f0f8ff" class="bodytext2_nojustify">Kindly please
browse the file that you want to attach. You are allowed to attach <b>ONE
file at one time only<b>. </td></tr><tr align = "center"><td
bgcolor="#f0f8ff" class="bodytext_12black">&nbsp; </td></tr><form
enctype="multipart/form-data" action="uploadfile_process.asp" method="POST"
name="frmUpload2"><tr align = "center"><td bgcolor="#f0f8ff"
class="bodytext_12black"><input TYPE="File" SIZE="30" MAXLENGTH="100"
NAME="docFile"></td></tr><tr align = "center"><td bgcolor="#f0f8ff"
class="bodytext_12black">&nbsp; said:
<input name="button" TYPE="button" Value="Attach"></a>&nbsp;
: <input name="button" TYPE="button" onclick="location.href
='javascript:history.go(-1)'"; Value="Cancel"></td></tr></form></table><%
: end if
: %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top