Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to use the File GDB API (1.2) .NET wrapper in an asp.net web service with no luck. The website will not load spitting out error: "Could not load file or assembly 'Esri.FileGDBAPI.DLL' or one of its dependencies. The specified module could not be found."

The .NET Wrapper works perfectly fine in a windows form application from my machine. Just to rule out the obvious:

  1. Esri.GileGDBAPI.dll, FileGDBAPI.dll, and FileGDBAPID.dll all are sitting in the bin of the website (along with OpenTK dll's)
  2. I have the prerequisite OpenTK installed
  3. Latest VC Runtime distributable installed.
  4. Website is targeting .NET 4.0

The fact that it runs fine in a windows form application gives me confidence that I have everything I need on my machine.

Does anyone have any other ideas and/or has anyone successfully used the .net wrapper in a .net webservice?

UPDATE: With the help of fuslogvw in the post I marked as the answer, I was able to to get the web service working after the directory containing the FileGDBAPI.dll and FileGDBAPID.dll was added to the 'Path' variable.

share|improve this question
    
I hava this problem in ASP.NET too.I can't resolve this problem with many ways.Did you resolved this problem now? –  user7941 Jun 1 '12 at 17:24
    
I ultimately got it working by making sure the native dlls were in a folder in the PATH environment variable. –  user890 Jun 2 '12 at 0:33
add comment

2 Answers 2

up vote 2 down vote accepted

Try enabling Fusion logging and inspect it with Fuslogvw to at least determine the reason for the assembly load failure: http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx

share|improve this answer
    
+1 Assembly binding logging saved me countless times. –  Petr Krebs May 5 '12 at 10:55
add comment

You might also try setting the application pool in which your website is running to the 32-bit mode.

The setting is called "Enable 32-bit applications" and you can find it under application pool's advanced setting in the IIS administration dashboard.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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