Hello Brian,
The ticket never really resolved anything. It just started working again after going back and forth with ThinkGeo and Microsoft. We just ran into this again this week. It stopped working on our servers in Oregon but other places in the US it worked. I couldn’t get it to create the xml file locally but if i turned my VPN on to change my IP location it would work again. I implemented a fix on our end that bypasses the ThinkGeo control being in charge of creating the xml file. Because i found that if you pull straight from the Bing API and create the file first, BingMaps then works in the control.
From what i can tell, the old ThinkGeo control might be using invalid parameters for the Bing API and maybe based on what bing server it’s pulling from, it errors trying to retrieve. Just a theory though based on reading this link: https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-imagery-metadata. In here it has the words of the imagery type as the parameter but in the link ThinkGeo sent me, they were passing in the MapType integer value. And when i tried to use the numbers pulling the xml straight from Bing, some would error and some would work.
So… I created my own links to pull and save the xml file at the start of my program so they are there when the ThinkGeo control needs them. Here is the code i used to pull and create my own xml straight from the Bing API:
Dim loginServiceTemplate As String = "http://dev.virtualearth.net/REST/v1/Imagery/Metadata/{0}?&incl=ImageryProviders&o=xml&key={1}"
Dim strUri As String = ""
Dim wc As New Net.WebClient
Dim xmlText As String = ""
If File.Exists(mobjUserFolders.BingMaps & "Road\BingMapsMetadata.xml") = False Then
strUri = String.Format(System.Globalization.CultureInfo.InvariantCulture, loginServiceTemplate, "RoadOnDemand", BINGKEY)
xmlText = wc.DownloadString(strUri)
File.WriteAllText(mobjUserFolders.BingMaps & "Road\BingMapsMetadata.xml", xmlText)
End If
If File.Exists(mobjUserFolders.BingMaps & "Aerial\BingMapsMetadata.xml") = False Then
strUri = String.Format(System.Globalization.CultureInfo.InvariantCulture, loginServiceTemplate, "Aerial", BINGKEY)
xmlText = wc.DownloadString(strUri)
File.WriteAllText(mobjUserFolders.BingMaps & "Aerial\BingMapsMetadata.xml", xmlText)
End If
If File.Exists(mobjUserFolders.BingMaps & "AerialWithLabels\BingMapsMetadata.xml") = False Then
strUri = String.Format(System.Globalization.CultureInfo.InvariantCulture, loginServiceTemplate, "AerialWithLabelsOnDemand", BINGKEY)
xmlText = wc.DownloadString(strUri)
File.WriteAllText(mobjUserFolders.BingMaps & "AerialWithLabels\BingMapsMetadata.xml", xmlText)
End If
I was going to share this with them today so they can look into it but hopefully this will help you as well in the meantime.
Jesse