Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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? Thanks

Edit: 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.

Cheers, Alex

share|improve this question
1  
This was a very strange situation... Keen to get it fixed. –  alextc Feb 15 '13 at 5:44
3  
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 '13 at 16:34
    
Thanks. I have edited my post. Please help. –  alextc Feb 18 '13 at 4:14
    
Anyone can give me a hand? –  alextc Feb 20 '13 at 0:57
add comment

1 Answer 1

I know this question is going on 13 months old now, but 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.

share|improve this answer
    
Welcome to GIS SE! Something that is different about this site compared to Discussion Forums and other Q&A sites is that we dispense with greetings, signatures, and other chat in order to focus on getting clear and concise Questions and Answers. If you want to let us know more about yourself, which I would encourage you to do, then your user card is the place to do that. It "signs" every Question, Answer and Comment that you post here. –  PolyGeo Mar 25 at 23:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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