0

Wrong result

When location is
         "The White Lady Hotel Kinsale  O'Connell Street   Kinsale  Cork  "

And you use the following code you would see a result in msg box.

c#:

Uri uri = new Uri(string.Format("http://where.yahooapis.com/geocode?q={0}&appid=", HttpUtility.UrlEncode(location)) + YahooAppID);
            string urlString = uri.OriginalString;
            WebRequest http = HttpWebRequest.Create(uri);
            HttpWebResponse response = (HttpWebResponse)http.GetResponse();           

            StreamReader stream = new StreamReader(response.GetResponseStream(), System.Text.Encoding.ASCII);
            String result = stream.ReadToEnd();
            MessageBox.Show(result);
            response.Close();
            stream.Close();

but if you browse the urlString in the browser you would see a different result which is expected.

Please someone help.


by
0 Replies
This forum is locked.

Recent Posts

in PlaceFinder General Discussion