AnsweredAssumed Answered

Runtime Local Server Not starting

Question asked by ddurgaprasad on Jul 23, 2015
Latest reply on Jul 27, 2015 by ddurgaprasad

I am facing similar problem using NET SDK. have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.6,I get below errors when running the application.I am not trying to Deploy yet.

  1. The application is running using developer license.The license is valid for development and testing only.
  2. Geoprocessor service failed.LocalServer start failed.executable not found.

What is the correct procedure to solve this ?

import arcpy
from arcpy import env
import os

env
.workspace =  arcpy.GetParameter(0)
fcList
= arcpy.ListFeatureClasses()

text_file
= open("C:/Output242.txt", "w")
for fc in fcList:
  
print fc.rstrip(".shp")
  text_file
.write(fc.rstrip(".shp"))

text_file
.close()

I am using the below code in C# NET for consuming this gpk service.

private string gpkPath = @"C:\Script2.gpk";
private string gpUrl = string.Empty;

private async void StartLocalGpService()
{
  
var gpService = new LocalGeoprocessingService(gpkPath,GeoprocessingServiceType.Execute);
  await gpService
.StartAsync();//Fails Here
  gpUrl
=  gpService.UrlGeoprocessingService;
  
var geoprocessor = new Geoprocessor(new Uri(gpUrl +"/Script2"));
}

Outcomes