problem with FDO

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with FDO

jayasser
hello
I'm starting in FDO and I want to use a web application in ASP.net

I add the DLLs
OSGeo.FDO.dll
OSGeo.FDO.Geometry.dll
OSGeo.FDO.Common.dll


my code:

IConnectionManager connManager FeatureAccessManager.GetConnectionManager = ();
         / / Call the manager's CreateConnection () Method to Obtain a Connection object.
       
       
         IConnect connManager.CreateConnection conn = ("OSGeo.SDF.3.2");
         conn.ConnectionString = @ "File = C: \ Documents and Settings \ Administrator \ Desktop \ geoinformation \ PFE \ Migration \ Data SDF DAR \ Carierre_130.sdf; ReadOnly = FALSE;
         / / Open the connection.
         OSGeo.FDO.Connections.ConnectionState connState = conn.Open ();
         / / if (connState! = OSGeo.FDO.Connections.ConnectionState.ConnectionState_Open)
         / / MessageBox.Show ("Can not Connect to the feature source ");
         / / else
         / / MessageBox.Show ("Connect to the feature source ");

         / / Close connection
         conn.Close ();


but it returns me an error:

  An external component has thrown an exception.

Exception Details: System.Runtime.InteropServices.SEHException: An external component has thrown an exception.

you have an idea where this error comes??
Reply | Threaded
Open this post in threaded view
|

Re: problem with FDO

Jackie Ng
You need all the dlls from the FDO SDK in your output directory, not just the ones starting with OSGeo.FDO.*

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: problem with FDO

jayasser
In reply to this post by jayasser
yes but when I add the DLL type OSGeo.FDO.Providers .*. dll it returns me the error


Error 1 The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Reply | Threaded
Open this post in threaded view
|

Re: problem with FDO

AMarkB
Not sure if this applies to your situation... but be aware that when you execute an ASP app in IIS that IIS may make temporary copies of the dlls that it thinks the app will need.  It will load those dlls instead of the original ones in the ASP app's folders.  However, when you have .net wrappers around native dlls, the way that FDO does, IIS may not actually copy all of the native dlls it needs to that temporary folder.  

You can put all of the FDO dlls in their own directory someplace and then add that directory to the start of your system path.  Then IIS will be able to find them.  However, this may cause all FDO-related apps on your server to use those same dlls.  Hopefully that won't be an issue.

Mark
Reply | Threaded
Open this post in threaded view
|

Re: problem with FDO

jayasser
In reply to this post by Jackie Ng
thank you for your help I solved the problem

now I have another problem with the connection to POSTGIS I generates an Error

Unable to Load the FDO Provider: The specified module could not be found.


- Jackie

Reply | Threaded
Open this post in threaded view
|

Re: problem with FDO

Jackie Ng
RDBMS providers do not just work out of the box. You have to do additional setup.

http://themapguyde.blogspot.com/2011/04/out-of-box-mapguidefdo-experience-or.html

- Jackie