Results 1 to 4 of 4

Thread: Securing files

  1. #1

    Thread Starter
    Addicted Member MrPresident2k's Avatar
    Join Date
    May 2002
    Location
    INDIA
    Posts
    167

    Securing files

    Hi,

    Is there any way to secure my files in my web server. Say I have a file for download in my web server called sample.doc. If a user tries to access it as ,

    http://www.server.com/docs/sample.doc, he shouldn't get the file.

    Any Suggestions.

    Thanks
    Pres

  2. #2
    Fanatic Member Kings's Avatar
    Join Date
    Aug 2001
    Posts
    673
    Put it above the wwwroot, and you won't be able to access it from the internet.
    K i n g s

  3. #3

    Thread Starter
    Addicted Member MrPresident2k's Avatar
    Join Date
    May 2002
    Location
    INDIA
    Posts
    167

    Files have to be avail for downloading..

    Hi,
    Thanks for the reply, but the problem is that these files have to be available for downloading. A user logged into the site has to download the site. But the problem is, any person directly typing the URL will get the file. Hope you understand the problem.

    Thanks,
    Pres

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    If you use IIS, you can configure Authentication for the file or folder its it, then set NTFS file permissions on the file.

    Also, you can write a script that reads a file from the filesystem and writes the results to the browser, using Response.ContentType to set the MIME type and Response.BinaryWrite to write the data.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

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



Click Here to Expand Forum to Full Width