[mapguide-users] Problem getting LocalNative to work in Maestro6 API and MapGuide 3.1

Hans Milling hm at geograf.dk
Wed Oct 5 04:54:59 PDT 2016


Hi. I have problems getting the LocalNative connection working with Maestro
API v6 and MapGuide 3.1.
This is what I have done:

1. Used the ProviderTemplate.exe to create a LocalNative provider DLL:
OSGeo.MapGuide.MaestroAPI.Native-3.1.0.dll
2. Used the MaestroAPITestRunner64.exe to check that the DLL is working with
the LocalNative tests enabled.

All is fine so far.

In my own source I now do this:
IServerConnection con =
ConnectionProviderRegistry.CreateConnection("Maestro.Http", "Url",
host.ToString(), "Username", username, "Password", password);
if (MapGuideApi.MgInitializeWebTier(@"C:\Program
Files\OSGeo\MapGuide31\Web\www\webconfig.ini"))
{
  localconnection =
ConnectionProviderRegistry.CreateConnection("Maestro.LocalNative",
"SessionId=" + con.SessionID + ";AllowUntestedVersion=true");
}

I then get the following error on the last createconnection:
Provider not registered: Maestro.LocalNative

I checked with the GetProviders, only the Maestro HTTP provider is
registered. I can see the API sources code when loading the providers form
the ConnectionProviders.xml, the source just ignores any exceptions (empty
catch).

I then tried to modify the Maestro API to throw any exception of the
provider cannot be loaded, to detect the error. But after compiling the
MaestroAPI and copying the OSGeo.MapGuide.MaestroAPI.dll file to my project,
the InitializeWebTier now failes with this error:
Could not load file or assembly 'OSGeo.MapGuide.MaestroAPI,
Version=6.0.0.8909, Culture=neutral, PublicKeyToken=f526c48929fda856' or one
of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)

Question is, do I need to do something with the dll I built myself to make
it work with the or do I have to rebuild the LocalNative provider again with
the ProviderTemplate64.exe file? Seems like the dll is missing both the
version number and the token (perhaps it was signed with the SDK, but is not
when I build myself?)




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-getting-LocalNative-to-work-in-Maestro6-API-and-MapGuide-3-1-tp5289410.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list