Select to view content in your preferred language

Bing Geocode Issues

667
4
02-09-2011 09:05 AM
TylerMunn
Emerging Contributor
I am attempting to add the Bing Geocoding function to my existing web applications - I'm using v2.0 of the API and ArcGIS Server 9.3. I currently have a Bing Maps basemap working with the token service.

I believe the issue is this line here
geocoder = new Geocoder(Application.Current.Resources["xxxxxxxx_Xxxxxxxxxx_xxxxxxxxx"] as string);


When I select the search button, I get the message "Error: Credentials are either invalid or unspecified"

Any input? Thanks.
0 Kudos
4 Replies
DanielWalton
Frequent Contributor
Do you have the Bing Maps Key stored as an application resource string, and are you referencing that key with a name that you have represented as the xxx's?
0 Kudos
TylerMunn
Emerging Contributor
I have the Token hardcoded in both the XAML (works fine), as well as the C#
0 Kudos
DanielWalton
Frequent Contributor
Your code looks otherwise. If you had it hardcoded, it would look like this:
geocoder = new Geocoder("abc........xyz");

Your code shows you referencing an application resource.
0 Kudos
TylerMunn
Emerging Contributor
You're right - I had actually tried that earlier and received a webpage error instead and thought they may have been related. Novice/Self Taught Developer here - looks like it's time to troubleshoot!
0 Kudos