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?