Iis – How to protect certain files from being downloaded

iisimages

I am using IIS. I have few image files on my server. I want to display them on my website, but when someone finds the URL and tries to access it from the server from the browser, I want to show them Access Denied and not let them download the file.

Is this do able? If yes, how do I do it?

Thanks.

Best Answer

I think what you are actually asking is how to prevent hotlinking? If so, then there are plenty of resources out there for that. Example: How to prevent image leeching (hot linking) in IIS 6.0