Select to view content in your preferred language

Silverlight Bing Geocoder not working

08-09-2017 09:06 AM
New Contributor

I have a Silverlight application that up until the past few days has been functioning without issue, but now I'm getting an exception from the Bing Geocoder. After three days of debugging I'm at my wit's end. I have made sure I'm on the latest version of ArcGISSilverlight-Bing available from NuGet (  Here is the code I am using to attempt to reverse geocode:

// get geocoding for the lat/long to have a populated address
 MapPoint location = new MapPoint( Longitude, Latitude );
 location = location.GeographicToWebMercator( );
 Geocoder reverse = new Geocoder( BingKey );
 reverse.ReverseGeocode( location, Reverse_Complete );

The exception being thrown is occurring before my callback is ever called (a breakpoint in my callback is never hit), but for completeness, here is a copy of the callback:

public void Reverse_Complete( object sender, ReverseGeocodeCompletedEventArgs args )
    ProcessCompletedResults( args.Result );

When I call ReverseGeocode (from the first code snippet), I get a "service method is not found" exception:

An exception occurred during the operation, making the result invalid. Check InnerException for exception details.

at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
 at ESRI.ArcGIS.Client.Bing.GeocodeService.ReverseGeocodeCompletedEventArgs.get_Result()
 at ESRI.ArcGIS.Client.Bing.Geocoder.geocodeService_ReverseGeocodeCompleted(Object sender, ReverseGeocodeCompletedEventArgs e)
 at ESRI.ArcGIS.Client.Bing.GeocodeService.GeocodeServiceClient.OnReverseGeocodeCompleted(Object state)
Inner Exception:
The service method is not found.
 at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
 at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
 at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
 at ESRI.ArcGIS.Client.Bing.GeocodeService.GeocodeServiceClient.GeocodeServiceClientChannel.EndReverseGeocode(IAsyncResult result)
 at ESRI.ArcGIS.Client.Bing.GeocodeService.GeocodeServiceClient.ESRI.ArcGIS.Client.Bing.GeocodeService.IGeocodeService.EndReverseGeocode(IAsyncResult result)
 at ESRI.ArcGIS.Client.Bing.GeocodeService.GeocodeServiceClient.OnEndReverseGeocode(IAsyncResult result)
 at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)

Any ideas for fixing or debugging this issue would be greatly appreciated.

0 Kudos
1 Reply
New Contributor

Not a definitive answer, but my guess would be this:

I have a Silverlight map that is currently not displaying any Bing basemaps.

0 Kudos