Could not load file or assembly 'Esri.FileGDBAPI.DLL'

4483
6
04-03-2014 05:40 AM
OliverMorris
New Contributor III
Hi,

We are tying to use the API within asp.NET 4.5 on IIS 7.5 we cannot load 3 modules including:

Esri.FileGDBAPI.DLL
FileGDBAPI.DLL
FileGDBAPID.DLL

In a console on windows 8 it runs fine but through asp.NET it simply doesn't load/work. The paths are correct all the dll's are in the Bin path, IIS is set to run it as a 32bit application, we also added the dll's to the GAC.

Does anyone have any ideas why this is and any solutions.

Thanks,

Oliver
0 Kudos
6 Replies
RichardWatson
Frequent Contributor
I don't know anything about the file geodatabase API.  That said, in .NET you can use the fuslogvw utility to find out additional information when .NET assemblies are loaded.  It helps to diagnose assembly load failures.
0 Kudos
OliverMorris
New Contributor III
Hi thanks we have tried to use this and it wasnt much help. Saw this recommendation in another post alrready. I havent seen any solutions to this issue.

Many thanks for your help,

Oliver
0 Kudos
OliverMorris
New Contributor III
Hi an update to this we used Dependency Walker to check dependency it gives these errors

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Anyone have any clue on this.

Many Thanks

Oliver
0 Kudos
RichardAbram
New Contributor III
I have deployed a web service using the API and my project references the Esri.FileGDBAPI.dll and I also put the 3 dlls you listed in a directory on the server and added that location to the System Path environment variable and that worked for me.
0 Kudos
OliverMorris
New Contributor III
Hi Richard,

We have put the 3 dll's in the bin path. We are using Visual Studio 2012, api 1.3 and .net 4.5. Setting the application pool to use 32 bit applications and have compiled for a x86 processor. We have also tried with 64bit compiling for x64 processor without success. we tried fuslogwview which gave no indication of failure.

Can you let me know what your setup was and where you located the dlls.

Many Thanks,

Oliver
0 Kudos
RichardAbram
New Contributor III
I ended up creating a directory on the c drive (c:\FGDB_Binaries) just for the binary files. Esri.FileGDBAPI.dll, FileGDBAPI.dll, FileGDBAPID.dll

The trick to get it to work for me was to put that directory name in the system PATH.  Just putting the files in the bin directory wasn't working.  In IIS I turned on "Failed Request Tracing" and view the error which pointed me to the fact it could not find the dlls in the various paths.  Adding the directory to the PATH solved my issue.
0 Kudos