AnsweredAssumed Answered

Geoprocessing package returns Error code '400' : 'Bad request: GET GPServer/execute The specified task was not found.

Question asked by mwinsor on Sep 25, 2015
Latest reply on Sep 25, 2015 by mwinsor

This happening with the ArcGis Runtime SDK for WPF 10.2.6

 

I created a geoprocessing package using the "Create Route" tool, and exported it as a gpk (the support ArcGIS Runtime checkbox is checked).

 

When I load it into the LocalGeoprocessingService and try to execute it with the Geoprocessor.ExecuteAsync command, I get an exception with this as the error message: "Error code '400' : 'Bad request: GET GPServer/execute The specified task was not found."

 

Does anyone have an idea of what's happening?

 

 

Here's my code for reference:

 

var service = new LocalGeoProcessingService(".\CreateRoutes.gpk");

service.MaxRecords = 500000;
service.ServiceType = GeoprocessingServiceType.Execute;

Geoprocessor processor = new Geoprocessor(new Uri(service.UrlGeoprocessingService));

// This is the line that fails. These parameters are taken from the page generated by the service URL.
await processor.ExecuteAsync(new GPInputParameter
                              {
                                 GPParameters = new GPParameter[]
                                                  {
                                                       new GPString("in_line_features", @"CreateRoutes\\Line"),
                                                       new GPString("route_id_field", "LineId"),
                                                       new GPString("measure_source", "TWO_FIELDS"),
                                                       new GPString("from_measure_field", "Begin"),
                                                       new GPString("to_measure_field", "End"), 
                                                       new GPString("coordinate_priority", "UPPER_LEFT"),
                                                       new GPDouble("measure_factor", 1),
                                                       new GPDouble("measure_offset", 0),
                                                       new GPBoolean("ignore_gaps", true),
                                                       new GPBoolean("build_index", true)
                                                  }
                              });


Outcomes