Re: Password on specific file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tom Kaminski [MVP] ((A_at_T))
Date: 09/27/04


Date: Mon, 27 Sep 2004 08:44:25 -0400


"Lars Thomsen Nielsen" <lars@EraseThisflexcom.dk> wrote in message
news:4158005c$0$250$bc7fd3c@news.sonofon.dk...
>I have made a secure website which you can only get access to
> with right username and password. On this webpage I have some
> links to some pdf-files, but how can I avoid people from getting
> the file if they are not logged on first? As it is now they can
> easily get the file if they just know the exact URL-address, ex:
> www.website.com/dir/file1.pdf
>
> If people type the URL above I would like them to be redirected
> to the logon-page first.
>
> I can't use components or MS-Access database, so I'm looking for
> another solution. Hope somebody can help me.

Place the PDF file outside the web root so it does not have a URL and call
an ASP that uses ADODB.Stream and Response.BinaryWrite to serve the file
(after the user has passed your authentication).

http://support.microsoft.com/default.aspx?scid=kb;en-us;276488&Product=asp

-- 
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com 


Relevant Pages

  • Password on specific file
    ... I have made a secure website which you can only get access to ... with right username and password. ... On this webpage I have some ... to the logon-page first. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Win 2K3, IIS6.0 Config
    ... > the correct username. ... > feature to upload a file to the web site. ... I'm not sure what you mean by the "FP Upload feature". ... Tom Kaminski IIS MVP ...
    (microsoft.public.inetserver.iis.security)