Results 1 to 3 of 3

Thread: Blocking access to image directories

  1. #1

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Blocking access to image directories

    I would like to be able to refuse access to some directories that contain images but still allow access to these directories for scripts via file i/o.

    In other words if you type http://192.168.14.30/design or http://192.168.14.30/design/example.gif you will get permission denied.

    However if a script was to access this url it would be allowed to view the directory contents with GetDirectories and GetFiles and even allow the download of files by a binary stream to the browser.

    Help would be appreciated as this is my first ASP.NET project. By the way I'm using C#.

    DJ

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Not sure how much experience you have with ASP.NET, but you could write your own HttpHandler that will handle all requests for your image files and deny or allow access based on the requirements.

  3. #3

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    Not enough to know what you are on about Could you give me some pointers?

    DJ

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