We have a method in C# to get the geocode location for certain addresses. It works great 99% of the time. I've ran in to an interesting situation and am hoping someone has ran in to a similar situation. I haven't been able to find a similar issue on the BING forum or through their development resources.
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
Stream data = client.OpenRead(uri);
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();
// Doing some magic with the response object here
The URI for this specific situation is:
http://dev.virtualearth.net/REST/v1/Locations?q=285%20Annshelia%20Dr,%20Keswick%20ON&key=<LIVEKEY>
The response that we are getting from the server is:
{"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2016 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":0,"resources":[]}],"statusCode":200,"statusDescription":"OK","traceId":"<THE_TRACE>"}
There are no HTML headers set for "X-MS-BM-WS-INFO" so it isn't an overload issue and we do have an enterprise key.
The part I'm interested in is how if we go to the Bing Maps website and search for the address of 285 Annshelia Dr, Keswick ON L4P 3A6, we get a proper geocode location.
Can anyone shed some light on why this would be giving me a blank stare when I ask for the geocodes?
The issue has been found - it was a spelling mistake on the street name.