2

I encountered a weird phenomenon on my ArcGIS Server 10.1.

I have a geoprocessing tool that exports a mxd file to an image file on my local directory, say "c://map/dir/export/image.png" It worked well. Then I published it as geoprocessing service on ArcGIS Server 10.1. When I ran it, it still worked but the image file was generated but stored as "export" in "c://map/". This file had no extension.

Additionally, "c://map/dir/export/" was set up as a virtual directory on the IIS so that it can be accessed through web browser whenever updated.

Any idea about a solution?

In my code, I have the following snippet.

prodWebServerGCPath = "C://arcgisserver/map/GC/GrasslandCuringVD"
arcpy.AddMessage("* prodWebServerGCPath: " + prodWebServerGCPath)

When run as geoprocessing, it strangely printed out as part of GP result:

 {
   "type": "esriJobMessageTypeInformative",
   "description": "* prodWebServerGCPath: ..\\grasslandcuringvd"
 }

I don't have any data stores set up in ArcGIServer Manager. It happened even if I removed the virtual directory from IIS.

1
  • 4
    Can you post the pyscript or a snippet of it. I think I know whats happening but have to see the script to be sure. I also assume you've setup a data store entry? And if you haven't, and are able to : install sp1 for Server. It has some GP publishing fixes.
    – KHibma
    Feb 15, 2013 at 16:34

1 Answer 1

1

I believe the gpservice deployment wizard (at 10.1) may have poorly-documented features which resulted in your mashed-up output file and path.

I noticed that your GP result output included a relative path: "..\grasslandcuringvd" which reminded me about the relative paths checkbox. When that feature is combined with the "run GPservice in-process" feature option, the two features essentially equate to: "Run the gpservice locally, and use a local path which appears relative to my deployment path."

So, that combination of locally-run process and relative pathing could have generated a messed up output image path/file.ext combination. (and by 'could' I mean 'probably did')

By now, you have likely upgraded to 10.2 and have redeployed your mxd-to-image gpservice in the new context; if so, I recommend that you edit your Question to update its status.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.