Limiting access to content

T

Technical

Hi,

I'm currently working on a webproject with ASP.NET 2.0, Visual Studio
2005, and SQL Server 2005 that allows users to search for and view
images. My problems is that I need a way to limit users from directly
accessing or linking to the images, but without needing to require
users to logon.
Currently, the site stores the images in a private directory and uses
the database for searches and file path information (I.E. the Image
WebControl, ImageURL receives the file path). How do I allow the user
to view images in the private folder (by use of an aspx page and Image
WebControl) without making them public, or how can I store them so that
directly accessing the file sends the user to a search page?
Any help would be greatly appreciated. Thanks in advance!
 
M

Mark Rae

I'm currently working on a webproject with ASP.NET 2.0, Visual Studio
2005, and SQL Server 2005 that allows users to search for and view
images. My problems is that I need a way to limit users from directly
accessing or linking to the images, but without needing to require
users to logon.

This question gets asked every month or so...

The short answer is - you can't...

In order for an image to be visible, the browser has to display it. This may
sound obvious, but it's fundamental to your issue. And in order for the
browser to display it, the server will stream it down to the client browser
as part of the WebResponse stream, whereupon the browser will almost
certainly place a copy of the image in its cache.

The best you can really hope for without resorting to implementing a secure
system (i.e. logging in) is to make thumbnails or, at least, copies of the
images which are of sufficient quality to be meaningful but which are not
worth downloading - maybe place a watermark such as 'SPECIMEN' over the
image...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top