问题是:远程服务器返回错误:NotFound
private WebClient client = new WebClient();
private string siteUrl = "http://www.google.com/";
// Constructor
public MainPage()
{
InitializeComponent();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri(siteUrl));
}
void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
try
{
if (e.Error == null)
{
webClientResults.Text = e.Result;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}