views:

1448

answers:

1

Hello,

I am using multiple instances of the WebClient class in order to download many small files at the same time asynchronously from a web server on the internet. The URI i'm using has it's IP in number notation to avoid unnecessary DNS resolutions.

I am pushing it a bit, using e.g. 50+ instances of the class at the same time. What I noticed is that although most files are downloaded correctly, a small percentage of them have 0 length, meaning that thread never completed succesfully -- maybe due to an error. However the AsyncCompletedEventArgs never reported an error.

Am I pushing it too much? But then again, shouldn't it give off an error?

+1  A: 

Sorry this isnt a comment, I dont have the rep yet.

Why do you need that many asynchronous downloads? Are you getting BitTorrent speeds of 5 kbps per connection? How many connections until your bandwidth is maxed out? maybe you are requesting too much from the server and it cant keep up with the connections? I just implemented an async download this week and there was no benefit to having more than half a dozen downloads at a time. Cant hurt to lower the number and see if that helps.

Mark Stahler