473,806 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to protect downloadable files

Hello,

I am writing a site where people can buy ebooks. I want to have a system
whereby they can download the file(s) once they have paid, but
(obviously) not before. I also want some sort of protection to stop
people simply posting the download link around the 'net and have every
Thomas, Richard and Harold grabbing them!

Any suggestions for this?

I was contemplating using URL rewriting to provide a temporary link that
contained the date encoded, and have it only work for (say) 24 hours
after they pay. If they want it after that, they have to ask me
manually. That should deter people who haven't paid. I'm not sure how
good a system this is though.

Bear in mind that I'm not going to drive myself mad over this. I can't
stop people simply distributing the ebooks themselves, so it's not worth
expending huge efforts on protecting the download. Having said that, I
want something that will deter petty thieves.

Any suggestions welcome. TIA
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 7 '08 #1
4 1148
The easiest way is to create Download.aspx page

which will evaluate the criteria (like if user logged in and has permission
to download this book ) and then redirect to error.aspx if criteria failed
or if success use Response.WriteF ile to output file.

PS: You will need to add folowing code

Response.Buffer = false
Response.AddHea der "Content-Disposition","a ttachment; filename=myeboo k.pdf"

So users will be prompted to save file myebook.pdf

George.
"Alan Silver" <al*********@no spam.thanx.inva lidwrote in message
news:Rg******** ******@nospamth ankyou.spam...
Hello,

I am writing a site where people can buy ebooks. I want to have a system
whereby they can download the file(s) once they have paid, but (obviously)
not before. I also want some sort of protection to stop people simply
posting the download link around the 'net and have every Thomas, Richard
and Harold grabbing them!

Any suggestions for this?

I was contemplating using URL rewriting to provide a temporary link that
contained the date encoded, and have it only work for (say) 24 hours after
they pay. If they want it after that, they have to ask me manually. That
should deter people who haven't paid. I'm not sure how good a system this
is though.

Bear in mind that I'm not going to drive myself mad over this. I can't
stop people simply distributing the ebooks themselves, so it's not worth
expending huge efforts on protecting the download. Having said that, I
want something that will deter petty thieves.

Any suggestions welcome. TIA
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)

Jan 7 '08 #2
You could have an obfuscated querystring that includes the customer name or
id, the date, and the id of the product to be able to download. If something
comes in and the decoded date is over 24 hours old, you would deny it.

There are a number of easy ways to encrypt or obfuscate a querystring. Here
is a simple one:

http://www.eggheadcafe.com/articles/20060427.asp
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Alan Silver" wrote:
Hello,

I am writing a site where people can buy ebooks. I want to have a system
whereby they can download the file(s) once they have paid, but
(obviously) not before. I also want some sort of protection to stop
people simply posting the download link around the 'net and have every
Thomas, Richard and Harold grabbing them!

Any suggestions for this?

I was contemplating using URL rewriting to provide a temporary link that
contained the date encoded, and have it only work for (say) 24 hours
after they pay. If they want it after that, they have to ask me
manually. That should deter people who haven't paid. I'm not sure how
good a system this is though.

Bear in mind that I'm not going to drive myself mad over this. I can't
stop people simply distributing the ebooks themselves, so it's not worth
expending huge efforts on protecting the download. Having said that, I
want something that will deter petty thieves.

Any suggestions welcome. TIA
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 7 '08 #3
in Computer management console ->default website select properties of your
website:
select the directory tab
click the configuration button and make a new entry for the file extensoin
you want to be handled by ASP.NET

"Alan Silver" <al*********@no spam.thanx.inva lidwrote in message
news:Rg******** ******@nospamth ankyou.spam...
Hello,

I am writing a site where people can buy ebooks. I want to have a system
whereby they can download the file(s) once they have paid, but (obviously)
not before. I also want some sort of protection to stop people simply
posting the download link around the 'net and have every Thomas, Richard
and Harold grabbing them!

Any suggestions for this?

I was contemplating using URL rewriting to provide a temporary link that
contained the date encoded, and have it only work for (say) 24 hours after
they pay. If they want it after that, they have to ask me manually. That
should deter people who haven't paid. I'm not sure how good a system this
is though.

Bear in mind that I'm not going to drive myself mad over this. I can't
stop people simply distributing the ebooks themselves, so it's not worth
expending huge efforts on protecting the download. Having said that, I
want something that will deter petty thieves.

Any suggestions welcome. TIA
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)

Jan 9 '08 #4
Thanks to everyone who replied. So far, it sounds like you are all
suggesting basically what I had in mind, so I'll carry on with that
idea.

Thanks

In article <O7************ **@TK2MSFTNGP03 .phx.gbl>, George Ter-Saakov
<gt****@cardone .comwrites
>The easiest way is to create Download.aspx page

which will evaluate the criteria (like if user logged in and has permission
to download this book ) and then redirect to error.aspx if criteria failed
or if success use Response.WriteF ile to output file.

PS: You will need to add folowing code

Response.Buffe r = false
Response.AddHe ader "Content-Disposition","a ttachment; filename=myeboo k.pdf"

So users will be prompted to save file myebook.pdf

George.
"Alan Silver" <al*********@no spam.thanx.inva lidwrote in message
news:Rg******* *******@nospamt hankyou.spam...
>Hello,

I am writing a site where people can buy ebooks. I want to have a system
whereby they can download the file(s) once they have paid, but (obviously)
not before. I also want some sort of protection to stop people simply
posting the download link around the 'net and have every Thomas, Richard
and Harold grabbing them!

Any suggestions for this?

I was contemplating using URL rewriting to provide a temporary link that
contained the date encoded, and have it only work for (say) 24 hours after
they pay. If they want it after that, they have to ask me manually. That
should deter people who haven't paid. I'm not sure how good a system this
is though.

Bear in mind that I'm not going to drive myself mad over this. I can't
stop people simply distributing the ebooks themselves, so it's not worth
expending huge efforts on protecting the download. Having said that, I
want something that will deter petty thieves.

Any suggestions welcome. TIA
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)

--
Alan Silver
(anything added below this line is nothing to do with me)
Jan 9 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
8908
by: LarryM | last post by:
Hi, NB, not to stop capturing the single displayed Image, but to stop downloading the entire image directory. (In my Website you will do a search, and get some thumbnails, and these can be enlarged one by one). This topic seems to be frequent. Some says that you under no circumstances can protect your images, others seem to have preventing solutions.
3
2214
by: JJ | last post by:
Hi, I am writing a cart in ASP selling downloadable files. The files are stored on remote locations i.e. http://www.thisfilestore.com/file1.zip And have different extensions, i.e. they are not all zip files. I would like to write a script which cann be called which will allow the download of the file, without giving away the url. Any Ideas/examples welcome!
11
3372
by: siliconmike | last post by:
Is there a way to protect data files from access by root ? I have a data-centered website and would like to protect data piracy from any foot-loose hosting company employee. Any ideas? Thanks Mike
3
1799
by: Fabrizio | last post by:
HI, I'm trying to create an aspx page that lists all files that an user can download from a site simply clicking on the link. There is any example on the web? Thanks, Fabrizio
4
1345
by: Ray Stevens | last post by:
How do you protect files (such as .PDF) in a hosted (Interland) environment when you have no access to IIS?
1
288
by: Hongbo | last post by:
Hi, We have a web site which needs user to login. After login, there are some files available for download on some pages. A typical link of such file is like this one: https://www.ourdomain.com/docs/contracts/c_02102006.pdf I noticed that any one could get this file if the person knows this link regardless if this person has logged in or not. Is there a way to prevent people who do not login to reach such downloadable files? Thank...
12
11099
by: =?Utf-8?B?am9uaWdy?= | last post by:
I wrote a simple VB.NET application that imports and edits CSV files. Now I’d like to “lock” the raw (pre-import) CSV files so these cannot be opened separately. It is not high-sensitive data, I just don’t want folks to peek in the files. So time-consuming encryption is not necessary, just a simple password-to-open that I can program in my application so it internally opens the imported CSV file would be perfect, but I can’t...
14
3651
by: lalit | last post by:
Hi there, Can some plz suggest me a way to show .ppt files on my website that can't be copied or saved by user using asp.net. any idea !!!! thankx
16
2583
by: Martin Schneider | last post by:
Hi! I want to maintain a large file link list (to legal files, by the way :-)). The links should be protected from "grabbing", though. Is it possible to make the browser download a link without making the link itself public? Passing through the data is not an option due to legal issues in Germany, not mentioning the traffic. Thanks for your ideas and best regards,
4
1569
by: Jim Aikin | last post by:
I'd like to learn JavaScript while sitting in my easy chair with my laptop on my lap. Option 1: Buy a wireless router so I can access the plethora of online- only tutorials from anywhere in the house. Option 2: Buy a book and try to figure out how to read a book with one hand while using the laptop with the other. Option 3: Find a good downloadable tutorial (either PDF or a bundle of
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.