Restricting PDF Files

Results 1 to 2 of 2

Thread: Restricting PDF Files

  1. #1
    Join Date
    Dec 1969

    Default Restricting PDF Files

    How can i restrict access to some PDF files on the server to some selected users using ASP&#039;s. <BR>I have an authenticated module which authenticates the user based on the session names and Ids. <BR>But i guess this can prevent unauthorised access only to the ASP files. I am looking to restrict the PDF files uploaded in that folder. These files can be downloaded by entering the file path in the URL address bar. <BR><BR>Any help here would be highly appreciated. <BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Same answer... this thread:<BR><BR><BR>which is just a few posts below. You&#039;ll have to "deliver" the files via ASP code, by reading them into an ADODB.Stream and then doing Response.BinaryWrite to the HTTP output.<BR><BR>CAUTION: You can *NOT* do this in an HTML page! This has to be done by the user clicking on an &#060;A HREF="sendpdf.asp?pdfname=whatever.pdf"&#062; link and by your then controlling the CONTENT_TYPE of the Response and by sending back *only* the binary file.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts