10.1 server geoprocessing tools 64 bit fails if dependent on 32 bit dll?

817
4
Jump to solution
08-30-2012 11:13 PM
StefanOffermann
Occasional Contributor II
Hi,

as ArcGIS for Server 10.1 is now completely 64 bit, I think some older custom geoprocessing services developed with C# may not work by simply re-compiling them for 10.1. When a DLL is compiled to 64 bit, I can run the gp tool in ArcCatalog and publish it to the server (this is in a32 bit environment). But when the DLL is dependent on a 32 bit DLL like LOG4NET, the tool run will fail on AGS with "tool not valid" on the first time a statement of the dependent 32 bit DLL is being executed.

Is this correct?

Best regards, Stefan
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Frequent Contributor
Maybe the problem is that the system cannot find log4net?

Download the latest log4net, build against it, install it in the GAC and retry.  I suspect that that will work just fine.

If it works then you can remove it from the GAC.

View solution in original post

4 Replies
RichardWatson
Frequent Contributor
Is log4net 32 bit only?

This is the one I am using:

C:\Windows\assembly\GAC_MSIL\log4net\1.2.11.0__669e0ddf0bb1aa2a

Note that it is in GAC_MSIL which I believe indicates that it can execute in either 32 bit or 64 bit host processes.
0 Kudos
StefanOffermann
Occasional Contributor II
Is log4net 32 bit only?


It seems so, because removing all references to log4net makes the tool work again under 10.1 server.

This is the one I am using:

C:\Windows\assembly\GAC_MSIL\log4net\1.2.11.0__669e0ddf0bb1aa2a

Note that it is in GAC_MSIL which I believe indicates that it can execute in either 32 bit or 64 bit host processes.


I would like to not use global assembly cache for any dependencies, because registering them needs administrator rights (this may be an anti-pattern?). I always try to avoid GAC.

Another strange behaviour: The working gp tool works fine when called from a toolbox in ArcCatalog. But a published gp service does not honor the given parameter values. Instead, the result is always the default result from the time when the service was published... is it a bug in 10.1 without service pack?

Best regards, Stefan
0 Kudos
RichardWatson
Frequent Contributor
Maybe the problem is that the system cannot find log4net?

Download the latest log4net, build against it, install it in the GAC and retry.  I suspect that that will work just fine.

If it works then you can remove it from the GAC.
StefanOffermann
Occasional Contributor II
Thanks, registering in GAC solved the problem 🙂
0 Kudos