5

I have an ArcPy script that does a whole bunch of processes with ArcGIS 10.1 to write the output data to a SDE geodatabase. What I want to achieve is to enable an online user to call the script and then do the job on the backend automatically.

I figured out CGI and made a mapping to py on IIS.

However, everything I called the script from the web. It threw out the following error:

HTTP Error 502.2 - Bad Gateway The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Creating catid files ESRI\Server10.1\Configuration\CATID\arcgis-response-streamer.catid.ecfg Create JARID File... outfile=ESRI\Server10.1\Configuration\JARID\arcgis-response-streamer.jarid.ecfg Creating catid files ESRI\Server10.1\Configuration\CATID\arcgis_indexer.catid.ecfg Create JARID File... outfile=ESRI\Server10.1\Configuration\JARID\arcgis_indexer.jarid.ecfg Content-Type: text/plain;charset=utf-8 Hello World! starts Hello World! ends ".

I am just wondering if ArcPy script can be exposed to CGI like a normal python script?

closed as off-topic by PolyGeo Apr 14 '17 at 6:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you are still interested in this, please provide more info as to what the processes are? I am running arcpy python scripts from asp.net on iis and came across this when searching for CATID and JARID. Maybe you would benefit from geoprocessing services. – Justin Feb 20 '14 at 19:41
  • The processes involved accessing raster image files on the local path, running Raster Calculators, writing to a TIFF file for output. That was it. I ended up with not using ASP.NET to call python; I published it on ArcGIS Server as geoprocessing web service instead. Back to the original question, did you manage to solve the same issue? – alextc Feb 23 '14 at 22:31
  • I haven't messed with cgi (that I know of). But I am calling python and arcpy from asp.net. I've been trying to get my head around which license is being called for the arcpy lib. Since it is the asp.net on a box with arcgis server, I have a strong feeling that it is that guys license. – Justin Feb 27 '14 at 20:35