Window authentication

Discussion in 'ASP General' started by Wzaq, May 11, 2004.

  1. Wzaq

    Wzaq Guest

    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
    %>
    Wzaq, May 11, 2004
    #1
    1. Advertising

  2. Wzaq

    Ken Schaefer Guest

    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

    "Wzaq" <> wrote in message
    news:...
    : 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
    : %>
    Ken Schaefer, May 11, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Connell
    Replies:
    1
    Views:
    544
    Natty Gur
    Oct 21, 2003
  2. raj mandadi
    Replies:
    0
    Views:
    426
    raj mandadi
    Dec 22, 2003
  3. Brett Porter
    Replies:
    2
    Views:
    758
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  4. Brett Porter
    Replies:
    5
    Views:
    583
    Brett Porter
    Feb 3, 2004
  5. Andrew Bewley via DotNetMonster.com

    window to window communication (window.opener)

    Andrew Bewley via DotNetMonster.com, Feb 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,044
    Andrew Bewley via DotNetMonster.com
    Feb 3, 2005
Loading...

Share This Page