I've developed a small C# application that will let me geocode a table of address using Bing's geocode service configured as a serivce reference. I have the assembly loaded but when I attempt to call it via stored procedure I received the following error:
A .NET Framework error occurred during execution of user-defined routine or aggregate "Geocoder":
System.InvalidOperationException: Could not find endpoint element with name 'BasicHttpBinding_IGeocodeService' and contract 'BingMapsGeo.IGeocodeService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
System.InvalidOperationException:
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName)
at Geocoder.BingMapsGeo.GeocodeServiceClient..ctor(String endpointConfigurationName)
at Geocoder.UserDefinedFunctions.geocode(SqlString AddressLine, SqlString City, SqlString State, SqlString Zip)
I'm fairly certain the actual C# assembly is correct but I think I'm missing something with regards to the actual web service.
I've been searching for solutions everywhere but haven't found one that seems to work.
I'm running SQL 2008R2 on Server 2008R2 with the latest patches and .NET versions.
Any ideas would be most welcome.