Answered Problems accessing virtual earth geocoding services

  • Wednesday, April 18, 2012 12:26 AM
     
      Has Code

    I am trying to start off simple by requesting the coordinates for Chicago IL and so I have this code below but am getting an error on the line with "GeocodeService.GeocodeResponse geocodeResponse = geocodeService.Geocode(Request);" .

    "Unable to automatically step into the server. Connecting to the server machine 'dev.virtualearth.net' failed. The Visual

    Studio Remote Debugger does not support this edition of Windows." It is a Message Box error not an error caught by my try and catch blocks. 

    private void frmBingMaps_Load(object sender, EventArgs e) { try { string Results = ""; GeocodeRequest Request = new GeocodeRequest(); Request.Credentials = new GeocodeService.Credentials(); Request.Credentials.ApplicationId = BingMaps.AppID; Request.Query = "Chicago, IL"; //Only return results with high confidence GeocodeService.ConfidenceFilter[] filters = new GeocodeService.ConfidenceFilter[1]; filters[0] = new GeocodeService.ConfidenceFilter(); filters[0].MinimumConfidence = GeocodeService.Confidence.High; //set the options to only return the high confidence results GeocodeService.GeocodeOptions geocodeOptions = new GeocodeService.GeocodeOptions(); geocodeOptions.Filters = filters; Request.Options = geocodeOptions; // Make the geocode request

    GeocodeService.GeocodeServiceClient geocodeService = new GeocodeService.GeocodeServiceClient("BasicHttpBinding_IGeocodeService");

    //Error thrown here GeocodeService.GeocodeResponse geocodeResponse = geocodeService.Geocode(Request); Results = geocodeResponse.Results[0].DisplayName; MessageBox.Show(Results); } catch (Exception E) { } }


All Replies