当我编译到Windows 8手机时,我不断收到此错误。
我想从API网址输出一些XML。
当我在浏览器中使用我的URL时,我得到了正确的XML格式,但是当我在Visual Studio 2013 Premium中编译时,我仍然遇到此错误。
private void WebQuestion()
{
System.Net.WebClient wc = new WebClient();
// Add event handlers when webbclienten received answers
wc.OpenReadCompleted += wc_OpenReadCompleted;
// Invoking web service asynchronously and let the answer be handled
string URL = "https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=885221892&key=D38259AC7F57D17B10F73A76C1873DD2&format=XML";
wc.OpenReadAsync(new Uri(URL));
}
void wc_OpenReadCompleted(object sender, System.Net.OpenReadCompletedEventArgs e)
{
if (e.Error != null)
{
return;
}
try
{
something
}
}