Erin
Erin

Reputation:

How do I limit the number of simultaneous downloads in Asp.net and/or IIS?

I have a website with a lot of large files. However, I don't want users to start downloading like 10 files at a time. I noticed there are website out there where they only allow 2 simultaneous downloads.

My website is programmed using ASP.net running on IIS. Does anyone know how I can limit simultaneous downloads?

Upvotes: 1

Views: 1828

Answers (4)

TorgoGuy
TorgoGuy

Reputation: 1326

The Dynamic IP Restrictions module from Microsoft (currently in beta) will do this.

For details and a download: http://www.iis.net/download/DynamicIPRestrictions

Upvotes: 2

Cory R. King
Cory R. King

Reputation: 2796

I think the only problem with max concurrent in IIS is it might block page requests rather than just download requests.

I'm no IIS expert but, if this setting is per domain / virtual host, you are set. If you can serve your downloads from a sub-domain that isn't used for anything, the setup it will not interfere with browsers that fetch several page elements at once.

Upvotes: 0

typemismatch
typemismatch

Reputation: 2058

I think the only problem with max concurrent in IIS is it might block page requests rather than just download requests.

I'd say write an HTTP Handler which actually does the download and can then decide (based on IP or Cookie) if a download is allowed to be sent back to the browser. Pretty straight forward code I'd think.

Upvotes: 1

Jim Deville
Jim Deville

Reputation: 10662

Do you want to do it programatically? Otherwise I believe there is a setting for max conncurrent connections from an ip address for IIS.

Upvotes: 0

Related Questions