ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 18th, 2003, 05:02 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 8
Protect download files

Situation:
I have some images that anybody can download. What I wan't is to only let people that have logged in (or got the URL to the file by mail?) be able to download the specific image they have ordered.

Is it possible to protect files like this?

I'm using ASP and Access.

What I have thought of is storing the files in Access as a Blob (but I don't wan't to do that because it will kill my DB), or giving the files random names.

Any better ideas/solutions?

If my English confuses you, I'm looking for a solution similar to http://www.templatemonster.com/

Thanx, EiSa

Reply With Quote
  #2  
Old February 19th, 2003, 09:25 PM
DeviantScripter DeviantScripter is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 22 DeviantScripter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Wink

Well, as far as I know, it's not possible to completely protect someone from downloading an image that you show them.

However, I do have a potential alternative.
You could display small thumbnails to all potential customers, then once someone has bought the picture, they will be able to download a high-quality, full-size version of it.

Anyways, just a suggestion! Good luck.

-D:S

Reply With Quote
  #3  
Old April 2nd, 2003, 07:34 AM
getemerson getemerson is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Surrey - UK
Posts: 7 getemerson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Protecting site downloads from unauthorised users

If your site is developed in ASP.Net -

You can use a session state boolean on each page that is requested by your visitors -

If the session state is false - simply redirect your visitor to a login page and/or registration page.

Your global.asa file will set the session state for first and subsequent visits and also reset the session state variable when they leave.

Simple and effective method that Ive used on my site.

Mark (getemerson)

Last edited by getemerson : April 2nd, 2003 at 07:47 AM.

Reply With Quote
  #4  
Old April 2nd, 2003, 09:35 AM
numbernine numbernine is offline
Up To His Eyes In Ads
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Chicago
Posts: 160 numbernine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 25 sec
Reputation Power: 8
Another way to do this would be to store the images in an inaccessible directory on the server. In an ASP page, you could check if the user was authenticated and if so open the image on the server in binary and send it to the client.

Reply With Quote
  #5  
Old April 2nd, 2003, 07:39 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Yup numbernine, that's the method i'd use too... create a virtual directory, and binary stream the img's out.

Reply With Quote
  #6  
Old April 3rd, 2003, 03:19 AM
getemerson getemerson is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Surrey - UK
Posts: 7 getemerson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Available resources

It does depend on how much control you have over the site that is hosting your web pages -

if its your home/own site then game on.

If you are using a hosting service? - There may be restrictions on what you can do - you may not have virtual directories at your disposal- usually you are given a couple of folder paths to work with as your own - and depending on the type of subscription service you have with the hosting company you may not even be able use ASP/ASP.net/database etc unless additional greenbacks exchange hands - which means you'll have to manage with just HTML and some JavaScript -

Having said that you may not have access to the global.asa file either - (in reflection to my original solution)

Hence my question ...

can you tell us more about what resources you have access to.

Reply With Quote
  #7  
Old April 5th, 2003, 01:04 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 8
Thanx for responding everybody. Haven't had time to look into into it because I'm short of time.

But to your information, it's not my server so I can't store things in a inaccessible directory. It's not images, it's zip-files.

EiSa

Reply With Quote
  #8  
Old April 6th, 2003, 10:41 PM
wes wes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 24 wes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Probably the easiest method in your case would be creating a simple member authentication system and using cookies or sessions to hold their logged in status. You also need a database table of paths to images, each with an ID.

Now, on your site you will call on an ASP page as the image source, passing in the image's ID. This page should connect to the DB, get the path, then do a Response.Redirect() to that path. This page should also have code to check if the user is logged in or not.

Only your users would be able to rip your images because they would have to call on the actual ASP script path and save the image it returns. It would make hotlinking and ripping from non-members impossible though.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Protect download files


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek