Bug 10265 - WebClient Incomplete download when used from parallel threads
Summary: WebClient Incomplete download when used from parallel threads
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.3.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Martin Baulig
Depends on:
Reported: 2013-02-13 05:13 UTC by Dmitry Adodin
Modified: 2017-02-24 22:07 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Dmitry Adodin 2013-02-13 05:13:56 UTC
when i trying to send parallel request using web client, it rises compilation hendler without errors, but with incomplete stream.

WebClient m_webClient = new WebClient();
m_webClient.OpenReadCompleted += HandleOpenReadCompleted;
m_webClient.OpenReadAsync(uri1, obj);
m_webClient.OpenReadAsync(uri2, obj);
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-02-13 06:58:55 UTC
WebClient does not support concurrent I/O operations, you need to create a new WebClient instance for each request (or wait until one request has completed before issuing another request).

In fact I get a NotSupportedException when I try your code (at the second OpenReadAsync), so I'm not sure how this is actually running for you at all.
Comment 2 Dmitry Adodin 2013-02-13 11:56:27 UTC
Sorry for misleading.
Yes, I use several WebClients. Actually code looks something like this:

for (int i=0; i<2; i++)
WebClient m_webClient = new WebClient();
m_webClient.OpenReadCompleted += HandleOpenReadCompleted;
m_webClient.OpenReadAsync(uri[i], obj);

When i use parallel wcf service client requests, i also have some errors with requests, that take no place when i send request consistently.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-02-13 11:59:56 UTC
Martin, this looks like your area.
Comment 4 Martin Baulig 2016-11-11 09:39:02 UTC
Does this problem still exist?
Comment 5 Vincent Dondain [MSFT] 2017-02-24 22:07:23 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!