Simple use of WebClient on Windows Phone 7 throws NetworkError

This code works in a WPF application, but throws a NetworkException ("server not found") in WP7. Why is the difference?

WebClient client = new WebClient(); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(Client_DownloadStringCompleted); Uri token = new Uri("http://www.bing.com"); client.DownloadStringAsync(token); 

Update: It seems that running Fiddler while debugging WP7 was the cause. Fiddler also crashes the browser on an emulator. Will there be a message if I find a workaround for using Fiddler to debug the emulator.

0
c # windows-phone-7 download
source share
1 answer

It is confirmed that he works here. You can send the code if you want to try a sample.

Perhaps you should check out doco proxy support if you are having trouble logging out of the emulator.

Proxy support for Windows Phone emulator

+1
source share

Source: https://habr.com/ru/post/650594/


All Articles