I have developed a custom GP tool in C# which does a bunch of processing on a given layer.

It works great in ArcMap on all machines that I have deployed it to. I created a model which uses this tool and want to publish it as a geoprocessing services. It worked without any problems on our testing machine (This was probably because the testing machine has Arcgis Desktop, as well as Server, & I published the service using the ArcCatalog on that machine itself).

Today I had to deploy it to our production server. This does not have ArcGIS Desktop. So I registered the DLL using ESRIRegasm on the server. But No matter what I do, I can't get a Geoprocessing service running using the custom tool. I tried placing the toolbox on the server and publishing it. It did get published, but when I conusmed it from ArcMAp, I got the error "ERROR 000816: The tool is not valid".

2 Answers
2

You can't deploy this without access to the GAC libraries, which are installed as part of ArcGIS Desktop or ArcGIS Server for .NET; there is no way of deploying an ArcObjects toolkit without first installing the above.

We deployed it with all it's library files contained in the deployment. This worked, but was completely at odds with ESRI licensing.

So in short, you can't do it without AGD or AGS 10 installed.

One other thing to note, regardless, and a major difference betwen 9.3.1 and 10, is that Once your tool model runs correctly, the tool needs to registered with the ESRI component categories before it can run within an ArcGIS Server 10 instance.

We have done this registration by creating a C# .Net setup project within our base C# .NET solution. This project has changed completely as a result of differences in component category registration functionality between ArcGIS 9.3.1 and ArcGIS 10 products.

Esri recommend placing common component category registration functionality in a separate C# .NET project that produces a DLL. This common DLL is then included within each setup project that needs it.

nerdy:
In ArcGIS 9 you used to register custom components with the ESRI component categories using the Windows registry. That's all gone and you do it via the 'InvokeEsriRegAsm'. It's the ESRI way of hooking the assembly in with COM without polluting the registry

I believe that a clarification might be necessary from my side. I have ArcGIS server 10 Installed on the Windows 2008 R2 server, but not ArcGIS Desktop. Your answer seems to suggest that it should be possible to publish a Service based on a custom tool. I am interested in how to do it.
–
Devdatta TengsheJan 25 '12 at 14:56

When you install the tool, you need to follow the outline I gave regarding the InvokeEsriRegAsm
–
HairyJan 25 '12 at 15:38