This is a migrated thread and some comments may be shown as answers.

Exception when setting the Provider

3 Answers 110 Views
Map
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 31 Jan 2010, 02:32 PM
Hello,

I am trying to make a simple app following the tutorial from the documentation.
I am using the trial version.

I did all the configuration of the services(bing map service, silverlight service, etc) and the token is returned successfully.

private void GetTokenCompleted(object sender, GetTokenCompletedEventArgs e)
        {
            string token = e.Result;
            // Initialize Virtual Earth map provider.
            VEMapProvider provider = new VEMapProvider(MapMode.Aerial, true, token);
            this.RadMap.Provider = provider;
        }

However, after setting the provider, on map display, it throws an exception:

System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details. ---> System.ServiceModel.FaultException`1[Telerik.Windows.Controls.Map.VEImageryService.ResponseSummary]: Credentials are either invalid or unspecified.
   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 Telerik.Windows.Controls.Map.VEImageryService.ImageryServiceClient.ImageryServiceClientChannel.EndGetImageryMetadata(IAsyncResult result)
   at Telerik.Windows.Controls.Map.VEImageryService.ImageryServiceClient.Telerik.Windows.Controls.Map.VEImageryService.IImageryService.EndGetImageryMetadata(IAsyncResult result)
   at Telerik.Windows.Controls.Map.VEImageryService.ImageryServiceClient.OnEndGetImageryMetadata(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Telerik.Windows.Controls.Map.VEImageryService.GetImageryMetadataCompletedEventArgs.get_Result()
   at Telerik.Windows.Controls.Map.BingMapProvider.ImageryService_GetImageryMetadataCompleted(Object sender, GetImageryMetadataCompletedEventArgs e)
   at Telerik.Windows.Controls.Map.VEImageryService.ImageryServiceClient.OnGetImageryMetadataCompleted(Object state)


It seems like there's a problem with credentials. However, on Bing Maps Customer Services page, testing the credentials on "Verify Credentials" page, it works without a problem.
"Your Bing Maps developer account credentials test was successful. You are authorized for access to staging."

I am sure I am using staging web service.
If I navigate in browser to "https://staging.common.virtualearth.net/find-30/common.asmx?wsdl "
I see it shows an XML, so it looks like I am having access.

Any ideas?

Thank you




3 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 31 Jan 2010, 06:02 PM

 I tried replacing with BingMapProvider  instead but it didn't work either.


0
Andrew
Top achievements
Rank 1
answered on 31 Jan 2010, 06:30 PM
I can't believe it.

I spent 3 hours trying to fix this, searching the internet for samples, etc.

Eventually, I went to the online reference and I saw that the new way of authentication is by the maps key instead token(generated by the service from the tutorial from your bing maps account id and pass).

You should update the trial documentation. Since CHM is HTML files packed, you just need to rebuild the CHM.
0
Giuseppe
Telerik team
answered on 02 Feb 2010, 09:35 AM
Hi Ken,

You can download the latest CHMs here.

Sorry for the inconvenience.


Greetings,
Manuel
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Map
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or