By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Limiting access to content

P: n/a
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!

Dec 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Technical" <T3****@gmail.comwrote in message
news:11*********************@f1g2000cwa.googlegrou ps.com...
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...
Dec 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.