Last post Dec 06, 2007 03:08 PM by brucevde
Oct 16, 2007 09:47 PM|p1000|LINK
I am writing a page in which users download images, but it is very important that no one else can download anyone else's images. So I want the images to be downloaded in an encrypted form and I would like to be able to do the following:
Is this possible? Can I return an image instead of a web page?
Oct 17, 2007 12:32 AM|OWScott|LINK
You can do this, yes. You would need to display the image and change the response.header to the right mime type so that the browser sees it as an image instead of a webpage.
Another option is to add a file mapping for your image types (i.e. jpg, jpeg, gif) so that they are handled by ASP.NET. You'll need to add a factory handler in your web.config file too. Then you'll need to have your login page take the querystring and
authenticate with it. With this solution, you could have the following:
Your login page will be able to get the password out of the querystring and you can manually handle authentication easily enough.
Both options will work, it's a matter of which you prefer.
Dec 06, 2007 03:08 PM|brucevde|LINK
Would an .ashx file work just as well? Would it not be more appropriate than using an aspx file?