[mapguide-trac] #659: WebAPI "Cannot establish connection". on different machine than server

MapGuide Open Source trac_mapguide at osgeo.org
Mon Aug 11 13:28:28 EDT 2008


#659: WebAPI "Cannot establish connection". on different machine than server
------------------------+---------------------------------------------------
   Reporter:  zspitzer  |       Owner:       
       Type:  defect    |      Status:  new  
   Priority:  medium    |   Milestone:       
  Component:  Web API   |     Version:  2.0.1
   Severity:  minor     |    Keywords:       
External_id:            |  
------------------------+---------------------------------------------------
 Hi all!

 I'm trying to use the .NET Api to establish a connection to a Mapguide
 2.0.1 Site without using a Web Viewer. My Application is a smart client
 and should run on a different Machine the MapGuide Server runs on.

 So I tried the following (in a Winforms Button_Click):

 MapGuideApi.MgInitializeWebTier("webconfig.ini");
 // Connect to the site.
 MgUserInformation userInfo = new MgUserInformation("Administrator",
 "admin");
 MgSiteConnection siteConnection = new MgSiteConnection();
 siteConnection.Open(userInfo);
 MgResourceService resService =
 (MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);

 This works so far, but when I try to use the Resource-Service like this:
 MgResourceIdentifier resID = new MgResourceIdentifier("Library://");
 MgByteReader resEnum = resService.EnumerateResources(resID, -1, "");

 the API throws get an "OSGeo.MapGuide.MgConnectionFailedException"
 (Message: "Cannot establish connection").

 The same code works on the MapGuide Server Machine.

 Is it possible to use the API to connect to a Mapguide Server on a
 different machine? Or do I have to use the Web-API (XML) over HTTP? I can
 change all my firewall rules, no problem.

 Any Ideas?
 Thanx,
 Nothi

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/659>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list