I'm getting a NotFound error in my application when trying to download a file from a HTTPS server using WebClient. It only occurs on certain devices (eg Nokia 810), but the same application runs fine on other devices (eg Nokia 910) and also on the WP emulator. The same URL also work fine when I just enter it into a browser on the PC.
Here's a basic knock up application that demonstrates the problem.
private void Button_Click(object sender, RoutedEventArgs e)
{
string URL = "https://MyDomain.com/MyFile.txt";
WebClient WC = new WebClient();
WC.DownloadStringCompleted += WC_DownloadStringCompleted;
WC.DownloadStringAsync(new Uri(URL));
}
void WC_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
txtResult.Text = e.Result;
else
txtResult.Text = "ERROR:\r\n" + e.Error.Message + "\r\n" + e.Error.StackTrace;
}
Unfortunately the server is out of my control, but it does have a full certificate (signed by Thawte) so it's not an issue with self signed certificates.
I've tried this test app both as WP7.1 and WP8 and it fails consistently on the same devices.
This is an app for public consumption so installing the certificate on the phone or any other phone configuration setting is not an option.