6

I have a GP Tool that I am able to publish as a GP service at 10.0.

I recompiled the DLL for 10.1 and have followed the steps in the Deploying custom .NET and C++ tools page of the 10.1 help doc. The tool works correctly in arcmap.

However, when I get to the step where I create the geoprocessing package, or when I try to publish directly as a service, I get error 00151 "Tool is unsupported on server".

Has anyone been able to take a custom GP Tool developed with C# and publish it to ArcGIS server 10.1 as a GP service without wrapping it with python?

(I do see this thread about difficulties with an executable - which I presume means an exe. I would like to avoid having to wrap all my tools in python, as suggested in that thread.)

Update

I probably should mention I also have desktop installed on the same machine with server (along with Visual Studio). It is interesting that even though I get the 00151 error, when I try to recompile the dll, Visual Studio fails, saying it can't delete the dll because it's locked by another process. It turns out that other process is arcgis server. If I stop the arcgis server instance I can recompile, implying that even though I get the 00151 error, arcgis server is still loading the dll into memory.

Update 2

Esri was able to provide me a simplified version of my gp tool. See the Deploying a Custom C# GP-Tool on 10.1 Server thread in the Esri forum. The project team will be deciding whether or not to port to python before I spend more time on trying to figure this out. Will update again once I get access to the test server.

5
  • What value of esriProduct are you returning from IGPFunctionName.MinimumProduct for that GP tool?
    – Petr Krebs
    Commented Sep 9, 2012 at 11:58
  • @PetrKrebs esriProductCodeBasic ... which is what it defaults to. Commented Sep 9, 2012 at 14:42
  • Kirk, did you actually resolve this issue? We're thinking of migrating to 10.1 and any follow-up information on this could help us. Thanks.
    – Petr Krebs
    Commented Oct 8, 2012 at 22:17
  • @PetrKrebs see update in main message. Commented Oct 9, 2012 at 18:02
  • Remember that in method IsLicensed you need also of authorize 'Arcgis Server' if you haven't simple 'return true'
    – nicogis
    Commented Feb 5, 2015 at 20:45

2 Answers 2

3

The problem lies with ESRIRegAsm for 64bit. It does not work in 10.1. Compile your dll for AnyCPU. Generate the ecfg registration file using regular ESRIRegAsm. Copy the ecfg file from desktop to the server folder. Then use the 64bit version of regasm.exe to register your dll.

5
  • 3
    Something tells me -- if this works -- it is not documented by ESRI anywhere :)
    – blah238
    Commented Sep 22, 2012 at 10:00
  • What exactly do you mean by "does not work"? We had no problems using the 64-bit ESRIRegAsm.exe with ArcGIS for Server at 10.1.
    – Petr Krebs
    Commented Dec 9, 2012 at 21:16
  • @PetrKrebs With both desktop and server installed on a machine, I run the 64 bit version of EsriRegAsm in C:\Program Files\Common Files\ArcGIS\bin\ESRIRegAsm.exe and then look at the Geoprocessing Function factory category with Categories.exe and there is no mention of my dll. When I run the 32 bit version of EsriRegAsm, it is there. Commented Jan 14, 2013 at 15:42
  • @Kirk: Does it create the .ecfg file when running 64 bit version of EsriRegAsm.exe?
    – Petr Krebs
    Commented Jan 14, 2013 at 18:35
  • I am deploying a custom c# 3.5 'AnyCPU' GP Tool as a GP Service on AGS 10.1. It works in Desktop. I published a Result from desktop to create the Service. I copied the tool DLL to a folder on the server, and tried to run 64-bit esriregasm.exe, which merely responded "registration failed". So then we tried hepiladron's trick to use 64-bit regasm and copy the tool's *.ecfg file from Desktop to Server at ..Program Files\ArcGIS\Server\bin\Configuration\CATID\. When I try to run the service from its Services Directory page, I get "Error executing tool.: ERROR 000816: The tool is not valid".
    – MC5
    Commented Mar 21, 2013 at 16:12
0

you can also see this article http://support.esri.com/fr/knowledgebase/techarticles/detail/40735

In arcgis server you register with esriregasm 64bit tool with: "C:\Program Files\Common Files\ArcGIS\bin\esriregasm" "c:\yourpath\mydll" /p:Server

2
  • Can you please provide more detail in your answer that draws on from the article you pointed to and the Question posted above. Usually answer that are just to links are subject to that link being on there forever and might not be directly applicable to the question.
    – dassouki
    Commented Jun 27, 2013 at 8:35
  • The article says to choose the Desktop option. You will also need to run EsriRegAsm again and choose the Server option so that ArcGIS server can see it and use it in a GP service. Commented Jun 27, 2013 at 15:50

Your Answer

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

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