Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Block access to images in website

Block access to images in website

Scheduled Pinned Locked Moved ASP.NET
questionhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prgramya
    wrote on last edited by
    #1

    Hi, Iam working on a web application MyApp. I have a root folder My App and a sub folder Media inside MyApp with images. The images are uploaded and downloaded through the application. I want to secure this folder Media so that no one can access the images by typing the URL http:// //MYApp/Media/ in the address bar . How can i block the access to images through browser such that the upload and download via application is not affected an no one can access images also? Any kind of help will be appreciated. Thanks Ramya

    I E 2 Replies Last reply
    0
    • P prgramya

      Hi, Iam working on a web application MyApp. I have a root folder My App and a sub folder Media inside MyApp with images. The images are uploaded and downloaded through the application. I want to secure this folder Media so that no one can access the images by typing the URL http:// //MYApp/Media/ in the address bar . How can i block the access to images through browser such that the upload and download via application is not affected an no one can access images also? Any kind of help will be appreciated. Thanks Ramya

      I Offline
      I Offline
      imsathy
      wrote on last edited by
      #2

      Go to IIS default website list, in that go to the properties of your website and uncheck the 'directory browsing' option.

      Sathy

      1 Reply Last reply
      0
      • P prgramya

        Hi, Iam working on a web application MyApp. I have a root folder My App and a sub folder Media inside MyApp with images. The images are uploaded and downloaded through the application. I want to secure this folder Media so that no one can access the images by typing the URL http:// //MYApp/Media/ in the address bar . How can i block the access to images through browser such that the upload and download via application is not affected an no one can access images also? Any kind of help will be appreciated. Thanks Ramya

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        Create a specific user for your application and grant that user read/write privileges. Then disallow similar privileges for the standard IIS account. Then use impersonation to execute the functionality from within your application.

        Need a C# Consultant? I'm available.
        Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups