Could not load assembly ESRI.ArcGIS.ADF.Connection.Local

5472
12
Jump to solution
11-28-2012 07:07 AM
LAFOSSE_CATELAnnick
New Contributor III
Hi,


I have Console Application that I need to migrate from 9.3 to 10.1.
I have done :
- Changed framework 2.0 to 3.5
- Put the new reference of ArcGis in 10.1
- Compile with platform target "Any CPU"

The problem is when i execute my console application on windows server 2008
I have this error : "Could not load ESRI.ArcGIS.ADF.Connection.Local".

On my server ArcGIser 10.1 and ArcSDE 10.1 are installed.

Thanks for your help.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Frequent Contributor
You cannot use this assembly in a 64 bit process.

This is a very fundamental point that cannot be changed.

Desktop is 32 bit and Server is 64 bit.  That means that you can only use a desktop license in a 32 bit process and you can only use a server license in a 64 bit process.  You have to choose.

If you choose 64 bit then you need to grab a server license.  In this case you cannot use any assembly in GAC_32. If the assembly has something that you really need then you can either write it yourself or reflect it out using a tool such as Reflector. 

I suspect that you are heading down the wrong path here.

View solution in original post

0 Kudos
12 Replies
nicogis
MVP Frequent Contributor
Compile with platform target "x86"
LAFOSSE_CATELAnnick
New Contributor III
It doesn't work.
My server is in 64 bits , ArcGis Server and ArcSde are also in 64 bits.

Should I register the ESRI.ArcGIS.ADF.Connection.Local ?

Thanks for your help
0 Kudos
RichardWatson
Frequent Contributor
There is nothing to register because this is .NET.

This is a partial listing of what I get on my machine:

Directory of C:\Windows\assembly\GAC_32

09/14/2012  01:42 PM    <DIR>          ESRI.ArcGIS.ADF
09/14/2012  01:42 PM    <DIR>          ESRI.ArcGIS.ADF.Connection
09/14/2012  01:42 PM    <DIR>          ESRI.ArcGIS.ADF.Connection.Local

Any assembly in GAC_32 can only be used in a 32 bit application.  If you want to call this assembly then your host process has to be x86.
0 Kudos
LAFOSSE_CATELAnnick
New Contributor III
Thanks for your response.
It helps me a little.

In my directory c:\windows\assembly, i have only

"ESRI.ArcGis.ADF.Local" (version 10.1.0.30.35)

So it is logical that my assembly ESRI.ArcGis.ADF.Connection.Local could not be loaded.

What do I forget ? Why ESRI.ArcGis.ADF.Connection is not present ?
0 Kudos
RichardWatson
Frequent Contributor
A while back, I put together a file which contains a list of the assemblies which are installed by server.

See attached file.  What it says is that the assembly you seek comes with the web adaptor.
0 Kudos
LAFOSSE_CATELAnnick
New Contributor III
I have installed ArcGisWeb Adaptort (Web IIS) but i have still the same error "Could not load assembly ESRI.arcGis.ADF.Connection.Local "

It happens when i call "ComReleaser.ReleaseCOMObject()".
0 Kudos
RichardWatson
Frequent Contributor
Validate that the referenced assembly is on your machine.

Validate that the process that you are calling this from is 32 bit.
0 Kudos
LAFOSSE_CATELAnnick
New Contributor III
The assembly is not on my server (although i have installed ArcGis Web Adpator (II

My console application is compiled in "Any CPU".
If I compile in 32bits, the licence initializer fails.
0 Kudos
RichardWatson
Frequent Contributor
You cannot use this assembly in a 64 bit process.

This is a very fundamental point that cannot be changed.

Desktop is 32 bit and Server is 64 bit.  That means that you can only use a desktop license in a 32 bit process and you can only use a server license in a 64 bit process.  You have to choose.

If you choose 64 bit then you need to grab a server license.  In this case you cannot use any assembly in GAC_32. If the assembly has something that you really need then you can either write it yourself or reflect it out using a tool such as Reflector. 

I suspect that you are heading down the wrong path here.
0 Kudos