When I calling site www.livescore.com by HttpClient class I always getting error \"500\". Probably server blocked request from HttpClients.
1)There is any other meth
Several things to take note of.
That site requires you to provide a user agent, or it returns a 500 HTTP error.
A GET request to livescore.com responds with a 302 to livescore.us. You need to handle the redirection or directly request livescore.us
This code works using the .NET 4 Client Profile, I'll let you figure out if it fits a Windows Store app.
var request = (HttpWebRequest)HttpWebRequest.Create("http://www.livescore.com");
request.AllowAutoRedirect = true;
request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17";
string content;
using (var response = (HttpWebResponse)request.GetResponse())
using (var decompressedStream = new GZipStream(response.GetResponseStream(), CompressionMode.Decompress))
using (var streamReader = new StreamReader(decompressedStream))
{
content = streamReader.ReadToEnd();
}