Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:08:19+00:00 2026-06-08T21:08:19+00:00

I am using the bing web service to find a shortest route between two

  • 0

I am using the bing web service to find a shortest route between two places.

But I get this strange error:

  public imagine_cup.RoutingService.RouteResponse EndCalculateRoute(System.IAsyncResult result) {

                object[] _args = new object[0];

                imagine_cup.RoutingService.RouteResponse _result = ((imagine_cup.RoutingService.RouteResponse)(base.EndInvoke("CalculateRoute", _args, result))); //error in this line

                return _result;

            }

the error states that it is a Server error.

Here is my code:

 public void CalculateRoute(List<Pushpin> wayPoints)
        {

            // Set the credentials.
            routeService.RouteRequest routeRequest = new routeService.RouteRequest();
            routeRequest.Credentials = new Credentials();
            routeRequest.Credentials.ApplicationId = _applicationId;

            // Return the route points so the route can be drawn.
            routeRequest.Options = new routeService.RouteOptions();
            routeRequest.Options.RoutePathType = routeService.RoutePathType.Points;

            // Set the waypoints of the route to be calculated using the Geocode Service results stored in the geocodeResults variable.
            routeRequest.Waypoints = new System.Collections.ObjectModel.ObservableCollection<routeService.Waypoint>();
            //Adding way points
            foreach (Pushpin ps in wayPoints)
            {
                routeRequest.Waypoints.Add(PushpinToWaypoint(ps));
            }

            // Make the CalculateRoute asnychronous request.
            _routeService.CalculateRouteAsync(routeRequest);
        }

I have update my bing maps key, so the reason is not an old key

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:08:21+00:00Added an answer on June 8, 2026 at 9:08 pm

    OK, now that we’ve established in the comments that the problem is in the distance between starting and ending point, here’s my answer.

    You can’t route large distances (not even on Bing maps (they obviously use the same routing services))… The service is created that way. If you really need this badly, you could think of some algorithm which would divide the distance into smaller chunks. Then you would find multiple routes between smaller chunks, and afterwards connect them (draw them connected on the map)…

    The obvious problem here is: how do you find the middle points to be able to divide the path in chunks? Well, one rather simple way would be to find the air distance between the points (see Haversine formula for that) and then divide it in equal parts. Obviously this means that you will be affecting the final route and that it almost definitely will not be the shortest route between the starting and ending point. Also, it may route your user to weird places (forests, deserts, sea) which don’t even have a road. Small digression: I don’t know why anyone would route between two distant countries/places at once except to just find out the driving distance, which they can do somewhere online…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Bing Maps SOAP Service, GeocodeService in my web application, to
I am using ASP.NET MVC 3 on my site, but get these strange errors
I'm making a program using RBing. But I unable to get 50 links. How
I'm using Bing Maps, and with CSS I'm styling the HTML-elements to get customized
I am using this WebPart to display Bing Maps, I did lots of research
I'm using the LanguageService (translation service) from Bing. I generated the F# soap client
I am using bing map in my web application using api-reference7 i i have
I managed to get the scorecard item using the BIMonitoringAuthoringServiceProxy webservice, but I have
I am currently using Bing Maps and getting returned the value of Lat/Lon but
I got this code which works 100% correctly using the Bing Maps Api V6.1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.