Windows phone 8 从Windows Phone调用php Web服务时出错

Windows phone 8 从Windows Phone调用php Web服务时出错,windows-phone-8,Windows Phone 8,我有一个使用XAMPP的本地服务器。我的服务器正在运行,我正在使用下面的代码从windows phone应用程序调用驻留在我的系统localhost中的PHP服务。 但我得到的错误是服务器未连接。请帮我修一下 void MainPage_Loaded(object sender, RoutedEventArgs e) { //callclient(); System.Uri myUri = new System.Uri("http://myip/myfol

我有一个使用XAMPP的本地服务器。我的服务器正在运行,我正在使用下面的代码从windows phone应用程序调用驻留在我的系统localhost中的PHP服务。 但我得到的错误是服务器未连接。请帮我修一下

void MainPage_Loaded(object sender, RoutedEventArgs e)
    {
        //callclient();
        System.Uri myUri = new System.Uri("http://myip/myfolder/check_login.php?/");
        HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(myUri);
        myRequest.Method = "POST";
        myRequest.ContentType = "application/x-www-form-urlencoded";
        myRequest.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), myRequest);
    }

    void GetRequestStreamCallback(IAsyncResult callbackResult)
    {
        HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
        // End the stream request operation
        Stream postStream = myRequest.EndGetRequestStream(callbackResult);

        // Create the post data
        string postData = "email_id=vipin@gmail.com&password=vipin123456";
        byte[] byteArray = Encoding.UTF8.GetBytes(postData);

        // Add the post data to the web request
        postStream.Write(byteArray, 0, byteArray.Length);
        postStream.Close();

        // Start the web request
        myRequest.BeginGetResponse(new AsyncCallback(GetResponsetStreamCallback), myRequest);
    }
    void GetResponsetStreamCallback(IAsyncResult callbackResult)
    {
        HttpWebRequest request = (HttpWebRequest)callbackResult.AsyncState;

        HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(callbackResult);
        using (StreamReader httpWebStreamReader = new StreamReader(response.GetResponseStream()))
        {
            string result = httpWebStreamReader.ReadToEnd();               
        }
    }

你应该连接到Fiddler,看看是否正在连接:@Matt:我会检查一下。但是没有简单的方法连接到php服务吗?它和任何其他非ASMX/WCF web服务都没有区别。我还没有检查您的代码,但我认为Fiddler是理解请求错误的正确第一步。