Setup ASP.NET application to run with FDO

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Setup ASP.NET application to run with FDO

Gunter Becker
Hi,

in my ASP.NET web application I would like to work with the FDO library.
When setting the path to FDO library in my environment variables then everything is working fine.

But I would like to have my web app to work without this "hardcoded" setting.

There where some suggestions in these posts:

http://osgeo-org.1560.x6.nabble.com/FDO-in-C-ASP-Net-Web-Application-td3900526.html
http://osgeo-org.1560.x6.nabble.com/problem-with-FDO-td3899122.html

But unfortunately this doesn't seem to work.


What I've done so far:

1. Copy all files from FDOs bin folder to my web applications bin folder

2. Set EnvironmentPath in Application_Start (Global.asax):

    string envPath = Environment.GetEnvironmentVariable("PATH");
    string newEnvPath = String.Concat(envPath, ";", Server.MapPath("bin"));
    Environment.SetEnvironmentVariable("PATH", newEnvPath);

3. Set reference to the following files:

    OSGeo.FDO.dll
    OSGeo.FDO.Common.dll
    OSGeo.FDO.Geometry.dll
    OSGeo.FDO.Spatial.dll

4. Testing this setup with:

    var mgr = FeatureAccessManager.GetConnectionManager();

    using (var connection = mgr.CreateConnection("OSGeo.SQLServerSpatial"))
    {
         var props = connection.ConnectionInfo.ConnectionProperties;

         ...
         
     }

When executing the first line I get this error:

An exception of type 'System.Runtime.InteropServices.SEHException' occurred in OSGeo.FDO.dll but was not handled in user code

I suppose that someone has already solved this problem.
So, what can I do. Any ideas!

Thanks, Gunter
Reply | Threaded
Open this post in threaded view
|

Re: Setup ASP.NET application to run with FDO

Gunter Becker
I found the answer by myself: insufficient privileges!
The worker process had no rights to read the fdo folder.

Gunter
Reply | Threaded
Open this post in threaded view
|

Re: Setup ASP.NET application to run with FDO

GordonL
Thanks for posting the solution Gunter!