• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Monitoring who download files

I have an html page that describes a product. A link at the end "try for free" will allow the visitor to download a trial setup.exe.  But I want to know who's downloading these trial copies , so my though is to have clicking of "try for free" bring up an order form that the user fills in with address, phone, email, etc.  When that form is submitted, the data is stored in a database and  another page comes up that simply has a button labeled "Download" that's  linked to setup.exe.  

But what's to keep someone from viewing the html source of the download page and seeing exactly where the setup.exe file is located and then giving that address to friends, coworkers, etc., to download setup.exe directly, without me knowing where the files are going?

How do people generally control free downloads from web pages?

Thanks for any thoughts.

steva

0
steva
Asked:
steva
  • 4
  • 3
1 Solution
 
Ashish PatelCommented:
What you can do here is when the link to download is clicked, dont have the URL of the setup.exe in the hyperlink. Instead call a file may be aspx which reads the setup.exe as binary stream and redirects it to the client using response.write with binary headers.
0
 
Ashish PatelCommented:
One more option to this can be a very simple stuff, where the download link can take you to another page and this page (aspx) which can redirect the setup.exe file to client user but before that you can check if the HTTP_Referer to this page is from the FORMS page or not. If not then dont do anything and redirect the user to FORMS page first and then once then submit the data you can redirect your setup.exe from that aspx page.
0
 
stevaAuthor Commented:
Ok. Great!  Let's try the second approach.

The only way I know of to download a file to someone from a web page is to specify the  .exe in a link, and then the viewer's local download software pulls it down when they right-click and select Save As.  How would I "redirect setup.exe to the client" and what would they have to do to initiate the download?

Thanks for your help.

steva
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Ashish PatelCommented:
for example the link will point to an aspx file
and the aspx file which we have created will have just one thing
<%
Response.Redirect ("/path/setup.exe")
%>
By doing this your setup.exe path would be kept hidden

0
 
stevaAuthor Commented:
Ok.  I assume my setup.exe can be 10 MBytes or so without causing  a problem?

And what happens at the user's machine when this stream starts coming down?  They still need to get their local  download software running somehow so they can specify where the file is to be stored.  
0
 
Ashish PatelCommented:
when we say Response.redirect("/path/setup.exe")

On clicking the link (the one with aspx file) they will be prompted to save or run the file as normal.

NOTE: Please put a check on this aspx file above the response.redirect to check that the referering page is your FORM page, something like below.
<%
If LCase(Request.ServerVariables("HTTP_REFERER")) = "http://www.mysite.com/formspage.aspx" Then
         Response.Redirect ("/path/setup.exe")
Else
        Response.Redirect ("/formspage.aspx")
End IF
%>
0
 
stevaAuthor Commented:
Got it!  Thanks for your help.

steva
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now