Reputation: 14871
I am curious as to how the file sharing sites like rapidshare detect users downloading files through download managers.
How do you enable an ASP.NET web application to prevent downloads from a download manager.
Upvotes: 3
Views: 3800
Reputation: 150
if you mean preventing resumable and multi-connection downloads you should add a Accept-Ranges:none header to your response.
In Asp.net or Asp.net MVC:
Response.AddHeader("Accept-Ranges", "none");
To know more about this see Accept-Ranges
Upvotes: 0
Reputation: 138841
Most of the download managers also use the Accept-Header
HTTP header allowing partial content download and restart over resets. See some docs here: HTTP Status: 206 Partial Content and Range Requests
Upvotes: 1
Reputation: 100527
I believe referrer ( http://en.wikipedia.org/wiki/HTTP_referrer ) could be used as another cheap check to see where download is initiated.
Upvotes: 1
Reputation: 13614
Sites like rapidshare don't have any access to your browsers/download managers. They find out the info about your downloads from their server according to your IP address.
I don't think you can make any web-application which can have such permissions.
Upvotes: 1
Reputation: 501
When you are a server, you can receive some interesting info about the client that access you.
One of the parameters is telling you the "User Agent", or in simple words the browser type.
In PHP it's in the array $_SERVER ( http://php.net/manual/en/reserved.variables.server.php ).
In Dot Net, I think it's part of the HttpRequest class ( http://msdn.microsoft.com/en-us/library/system.web.httprequest.aspx ).
On real-time, you can "ask" those params what are the client type (IE, Firefox, or an independent client), and react to it like preventing download.
Upvotes: 2
Reputation: 108790
What do you want to prevent? A download-manager isn't evil by itself.
How do you even define a download manager? Every web-browser has an integrated download-manager of varying quality.
You should try to prevent the behavior you don't like in download-managers, and not download-managers themselves.
Upvotes: 1