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:
>

Can you be a bit more specific than "blows up everything"? Is an exception
thrown? Is anything printed to the application output / console? Any crash
reports?

Rolf


>
>  // 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
>
> 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

Reply via email to