SSIS Batch Geocoder [91]] Error: System.Net.WebException: The remote server returned an error: (401) Unauthorized

Sep 29, 2011 at 8:01 PM

I am having a problem getting an error 401 back as soon as it transform starts.  I have double and tripled check my Bing Key and it is working just fine with the Rest service.   The full text from the error is below...

[SSIS.Pipeline] Information: Execute phase is beginning.

 [SSIS Batch Geocoder [91]] Error: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

   at System.Net.HttpWebRequest.GetResponse()

   at SSISBatchGeocoder.Geocoder.ExecuteBingGeocodeFlow()

   at SSISBatchGeocoder.Geocoder.ExecuteBatch()

   at SSISBatchGeocoder.GeocoderTransformation.FlushCurrentBatch()

   at SSISBatchGeocoder.GeocoderTransformation.ProcessInput(Int32 inputID, PipelineBuffer buffer)

   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)



Any insight that anyone has would be awesome!




Sep 29, 2011 at 8:39 PM

I guess if I would read I might have seen this message in the Bing Maps Portal :


"If you would like to request access to Spatial Data Services, you can do so by emailing with your Account ID and (for publically accessible sites) top level domains. Be sure to send this request from the email account on record in the Bing Maps Account Center."


I am going to assume that this is the problem, I have emailed them and waiting on the response.


Oct 4, 2011 at 7:37 AM

Please keep us posted on how that worked out for you. I am currently experiencing the same error. 

Jan 19, 2012 at 4:36 PM

I received the same error myself today: "System.Net.WebException: The remote server returned an error: (401) Unauthorized." The failure actually occurred yesterday evening. I will investigate and report back when I have a little time to spare.

Jan 19, 2012 at 5:17 PM

Sorry for not following up on this question. After going round and round with a sales rep at MS i gave up. The only thing that I could find was that the way that it was going to be used did not jive with the EUA. Because it was going to be stored in a database and not used for mapping on Bing maps (at the moment) they would not allow access for my account to the service. That makes it a little hard to develop a web portal if it has to be built before having any data to test it with. I ended up using a third party (as suggested) to get the test data and we are currently looking at other avenues to avoid using MS map services. Direct response from the sales rep below:

“Unfortunately other components of the service would be required, we don’t make the Bing Maps service available for purely geocoding but you can certainly find a 3rdparty geocoder that would fulfill that requirement.”

Jan 19, 2012 at 5:27 PM

Oh no. I don't recall that being part of the EULA at the time I wrote the component.

I recently moved the portion of my website that contains the Bing maps (which do indeed use the geocode flow data), and now I am wondering if that has something to do with the failure yesterday. I believe the website URL is part of the account information.

While I work for a non-profit and applied for an account as such, I was under the impression that commercial accounts were available from Bing that would allow use of the geocode flow. Is that not the case? The SSIS component uses the batch geocode flow, not the real-time geocoding features, and I am surprised that this issue would arise.

Jan 19, 2012 at 5:37 PM

The way that I understood it was that if you were using it for show the map points on a Bing maps then you are fine. I didn’t dig too deep into the EULA to find what the rep was referring.

If you do find a different answer please let me know because it would make it much easier to use your data flow than the way that I am currently doing it.

Jan 19, 2012 at 6:18 PM

I might have a contact that could help clarify this issue, though it may be a while before I can follow up with him. If it can't be resolved -- if they really do not want the business -- then it might be time to consider a Google option for the geocoder (if in fact that would solve the problem) or perhaps interfaces to other commercial providers.

Jan 19, 2012 at 7:56 PM

We are still working on the project that is going to be using the address so I have sometime before I need the data. I have looked at Mellissa Data because we have used them in the past but as of right now we have not made a decision on what direction we are going to go with it.