English 中文(简体)
远距服务器回落了一个错误:不是创始者
原标题:Remote Server returned an error : Not Found

我撰写了一个方案,向特定地点发出要求并做出回应。 它与当地东道方适当运作,但如果是www.google.com的话,它就会造成错误,因为“复发的错误:不是创立的”。

<><><>>>><>>>>>>*** ∗∗∗∗∗∗

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO;


namespace WindowsPhoneApplication2
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            var request = (HttpWebRequest)WebRequest.Create(new Uri(@"http://www.google.com"));

            request.BeginGetResponse(r =>
            {
                var httpRequest = (HttpWebRequest)r.AsyncState; 
                var httpResponse = (HttpWebResponse)httpRequest.EndGetResponse(r);
                using (var reader = new StreamReader(httpResponse.GetResponseStream()))
                {
                    var response = reader.ReadToEnd();
                    Deployment.Current.Dispatcher.BeginInvoke(new Action(() => { textBox1.Text = response; }));
                }
            }, request); 

        }


    }
}

please tell me soultion thanx in advance

问题回答

你的法典为我工作。

Can you access Google from IE on the device/emulator?
I suspect that this is a networking issue local to you and not related to the device.





相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签