views:

165

answers:

1

This code works in a WPF app but throws a NetworkException ("server not found") in WP7. Why 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 looks like running Fiddler while debugging WP7 was the cause. Fiddler also breaks the browser on the emulator. Will post if I find a workaround for using Fiddler to debug the emulator.

+1  A: 

Confirmed it works here. Can post code if you want a sample to try.

Might be an idea to check the proxy support doco if you're having trouble communicating out of the network from the emulator.

Proxy Support for Windows Phone Emulator

Mick N
It was broken yesterday but magically works today! Thanks for trying out the code.
James Cadd