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

3350
1
Jump to solution
09-25-2015 09:27 AM
Labels (1)
MikeWinsor
New Contributor III

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)
                                                  }
                              });

0 Kudos
1 Solution

Accepted Solutions
MikeWinsor
New Contributor III

And I messed up... apparently I was supposed to put the name of the task in the URL.

The code executes properly since doing that.

View solution in original post

0 Kudos
1 Reply
MikeWinsor
New Contributor III

And I messed up... apparently I was supposed to put the name of the task in the URL.

The code executes properly since doing that.

0 Kudos