0

I'm writing a little game for windows phone. It puts scores of everyone to mysql database(using php) and gets the best score. Everything works fine on the emulator, unfortunately it does not work on the physical device.

Here's the code for getting the best score:

    public static void retrieveBestScore()
    {
      string uri = "https://xxxxxx.net/get_scores.php?sort=score%20DESC&count=1";
      HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(uri));
      request.BeginGetResponse(new AsyncCallback(ReadCallback), request);
    }

    private static void ReadCallback(IAsyncResult asynchronousResult)
    {
        HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
        [...]
    }

ReadCallBack method if fired, but asynchronousResult's AsyncWaitHandle parameter is

base = {System.NotSupportedException: Specified method is not supported. at System.Net.Browser.OHWRAsyncResult.get_AsyncWaitHandle()}

I've read somewhere the problem may be caused by using https instead of http, but it's not the case here.

Michał Żołnieruk
  • 2,095
  • 12
  • 20

0 Answers0