[mapguide-users] Create Featuresource

Gunter Becker gunter.becker at csogis.de
Thu Oct 1 05:57:52 EDT 2009


Hi Kenneth,

thank you for your clarification. I've got it running with the solution you
mentioned. I added an entry to the PATH env variable that points to the bin
folder of my FDO SDK. That's a solution for my development environment. But
when I release our WebApplication to our costumers I think I can't convince
them to first download the FDO SDK and then set an environment variable. Any
Idea?

By the way, what is the difference between the FDO dll's and the MapGuide
dll's. 
When I reference the MapGuideDotNetApi.dll I also have to copy the c++ dll
into the bin folder. That works fine. Obviously the "windows dll location
algorithm" looks into the bin folder.
With the FDO libraries (managed / unamanged) I see no difference. I should
be able to add the reference to all managed libraries and then put the
appropriate c++ dll into the bin folder. Why does this scenario fail?

Thanks, Gunter


Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> When running a WebApp the actual assembly is placed in a temp folder.
> You can read System.Reflection.Assembly.GetExecutingAssembly().Location, 
> to see it.
> The windows dll location algorithm looks in the current dir, then 
> searches path, etc.
> You need the dll's to be in the PATH env paths, you also need native 
> code execution
> privileges.
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> Jackie Ng skrev:
>> FDO needs the VC++ runtime library. The OSGeo.FDO.*.dll files are .net
>> wrappers around the native libraries which use the VC++ runtime. Do not
>> uninstall it.
>>
>> The fact that you have it working in a windows application means that you
>> have the runtime library installed. It also means that there is
>> definitely
>> something to do with it being a web application, that's causing FDO to
>> fail.
>> What that is, I do know at the moment.
>>
>> - Jackie
>>
>>
>>
>> Gunter Becker wrote:
>>   
>>> Using the SDK File in a WindowsApplication works for me!
>>>
>>> But I would like to manage the creation of a feature source in the
>>> WebApplication.
>>>
>>> I think I have the C++ runtime library installed but I don't know
>>> exactly.
>>> How can I determine that I have Visual C++ 2008 runtime library
>>> installed?
>>> I don't need it becaus I#m not a C++ programmer! So do you think
>>> uninstalling the runtime library could solve my problem?
>>>
>>> Gunter
>>>
>>>
>>>
>>> Jackie Ng wrote:
>>>     
>>>> Do you have the Visual C++ 2008 runtime library installed?
>>>>
>>>> If so, I wonder then if it is because you are using this in an ASP.net
>>>> environment and that is somehow messing with the paths?
>>>>
>>>> - Jackie
>>>>
>>>>
>>>> Gunter Becker wrote:
>>>>       
>>>>> OK, I tried it with the SDK files and know I got the error message:
>>>>>
>>>>> "The specified module could not be found"
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Gunter
>>>>>
>>>>>
>>>>> Gunter Becker wrote:
>>>>>         
>>>>>> No, these files are from "FDO API and Common Binaries" under "Windows
>>>>>> Binaries". Does it make a difference?
>>>>>>
>>>>>> I'll download the SDK files an give this a try!
>>>>>>
>>>>>> Gunter
>>>>>>
>>>>>>
>>>>>> Jackie Ng wrote:
>>>>>>           
>>>>>>> These dlls are from the FDO SDK?
>>>>>>>
>>>>>>> Make sure that *all* the dlls (and providers.xml) from your FDO SDK
>>>>>>> are in the output directory
>>>>>>>
>>>>>>> - Jackie
>>>>>>>
>>>>>>>
>>>>>>> Gunter Becker wrote:
>>>>>>>             
>>>>>>>> Thank you Jackie,
>>>>>>>>
>>>>>>>> I've put all the managed and unmanaged dll's from the windows
>>>>>>>> binaries in the bin folder of my WebApplication and tried to follow
>>>>>>>> your steps but I got an error message :
>>>>>>>>
>>>>>>>> File or assembly  "file:///C:\Users\gunter.becker\Documents\Visual
>>>>>>>> Studio 2008\Projects\CSOGIS\bin\ExpressionEngine.dll" or one of its
>>>>>>>> dependencies, was not found. The module was expected to contain an
>>>>>>>> assembly manifest.
>>>>>>>>
>>>>>>>> Do you know if I miss something?
>>>>>>>>
>>>>>>>> Gunter
>>>>>>>>
>>>>>>>>
>>>>>>>> Jackie Ng wrote:
>>>>>>>>               
>>>>>>>>> FDO is the way to go. As Kenneth already mentioned, this approach
>>>>>>>>> won't be portable unless you want to dive into the native C++ API.
>>>>>>>>> The Managed FDO API is only available for Windows.
>>>>>>>>>
>>>>>>>>> To do this, you will have to do the following:
>>>>>>>>>
>>>>>>>>> FDO side:
>>>>>>>>>
>>>>>>>>> 1. Create a FDO connection to the desired provider
>>>>>>>>> 2. Create and execute an ICreateDataStore command
>>>>>>>>> 3. Build your FDO feature schema (similar to MapGuide)
>>>>>>>>> 4. Create and execute an IApplySchema command, with the schema you
>>>>>>>>> built.
>>>>>>>>>
>>>>>>>>> Then it's over to the MapGuide side:
>>>>>>>>>
>>>>>>>>> 1. Create a new feature source xml document with the same
>>>>>>>>> connection
>>>>>>>>> settings 
>>>>>>>>> 2. Save this into your site repository using MgResourceService.
>>>>>>>>>
>>>>>>>>> The MapGuide 2.2 APIs will eventually remove the need to use FDO
>>>>>>>>> directly for some providers (the non-RDBMS ones)
>>>>>>>>>
>>>>>>>>> - Jackie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Gunter Becker wrote:
>>>>>>>>>                 
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I want to create a new featuresource (shp, sdf or SQL Server 2008
>>>>>>>>>> Spatial) from my webapplication (c# .NET). I got it working for a
>>>>>>>>>> sdf FeatureSource with the MapGuideAPI. But I'm wondering if it
>>>>>>>>>> is
>>>>>>>>>> possible for SHP or SQL Server Spatial at all. What are the steps
>>>>>>>>>> to create an shape-file in the repository or as an external file
>>>>>>>>>> and what are the steps to create a spatial database table. Is
>>>>>>>>>> there
>>>>>>>>>> an easy way to do this with the MaestroAPI. Or do I have to use
>>>>>>>>>> the
>>>>>>>>>> FdoAPI ?
>>>>>>>>>>
>>>>>>>>>> Thanks, Gunter
>>>>>>>>>>
>>>>>>>>>>                   
>>>>>>>>>                 
>>>>>>>>               
>>>>>>>             
>>>>>>           
>>>>>         
>>>>       
>>>     
>>
>>   
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Create-Featuresource-tp3735230p3748034.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list