Exception when setting the Provider

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    23 posts
    Member since:
    Oct 2008

    Posted 31 Jan 2010 Link to this post

    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




  2. Andrew
    Andrew avatar
    23 posts
    Member since:
    Oct 2008

    Posted 31 Jan 2010 Link to this post


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


  3. Andrew
    Andrew avatar
    23 posts
    Member since:
    Oct 2008

    Posted 31 Jan 2010 Link to this post

    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.
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 02 Feb 2010 Link to this post

    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.
Back to Top