Hi, On Mon, Apr 16, 2012 at 10:45 AM, victoria <[email protected]> wrote:
> Hello list, > I'm not sure if this is a Monotouch bug or if we're doing something wrong > here. We're trying to use System.Net.WebClient to fetch some data async > with > a nice optional "Cancel this download" button for the user - however trying > to cancel the request blows up everything. Behold: > > // random somewhat big file to not download > string file = > "http://www.kernel.org/pub/linux/kernel/v2.0/linux-2.0.1.tar.bz2"; > > WebClient client = new WebClient(); > client.DownloadDataAsync(new Uri(file)); > client.CancelAsync(); // kaboom > I just tried this exact code, and it works fine for me. I've looked at both the exception and our WebClient implementation, and the exception doesn't make much sense - so something is obviously going wrong. I suggest you file a bug with a complete test case, and I'll have a look at it asap. Rolf > > The code above works just fine on .NET/Windows - also, changing > DownloadDataAsync to DownloadStringAsync seems to work as we would expect > it > to (no kaboom, but we need the raw data so unfortunately we can't use it) > > Thoughts? Bug? Help? > > / V > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/CancelAsync-on-DownloadDataAsync-crashes-monotouch-tp4560900p4560900.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
