Print Page | Close Window

Protecting Files

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=11227
Printed Date: 31 March 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Protecting Files
Posted By: philcom2000
Subject: Protecting Files
Date Posted: 18 July 2004 at 1:58pm
I am designing a download manager and i want to protect the location of my download files. The main idea is to stop people downloading using direct links also leaving the option open to restrict access to files so they can be sold then the user can be pointed to the download location after purchase. Any idea's tips or links would be a great help, i don't need and exact answer just a point in the right direction.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 18 July 2004 at 2:54pm
For this site to do what you ask I use ADO.Stream, part of ADO to stream the file to the browser from a hidden location.

There are lots tutorials on the web for this if you search on google.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: philcom2000
Date Posted: 18 July 2004 at 4:21pm

Found a great tutorial on ADO.Stream just what i was looking for thanks for the tip.



Posted By: WebWiz-Bruce
Date Posted: 19 July 2004 at 3:32am
One thing to look out for though is that allot of people where complaining that the zip was corrupted becuase for some reason the stream was being cut short.

I sorted the problem by getting the ADO.Stream in smaller chuncks using the following code:-

'Send zip to browser
Do Until objADOStream.EOS
   
   'Make sure browser is connected
   If Response.IsClientConnected Then
                     
       'Write the ado stream in small scable chunks
       Response.BinaryWrite objADOStream.Read(100000)

       'If buffer is done empty
       If Response.Buffer Then
          Response.Flush
       End If
    Else
       Exit Do
    End If
Loop



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net