We are in the process of upgrading our ArcGIS Server to 10.2.2. We have an SOE for printing high quality maps. As part of the SOE we connect to the server and get the Map Services and the layer information for each. The code below fails at conn.Connect(server); Please provide guidance as to how we can connect to our server with our SOE in 10.2 and get the map services and layer information. Thanks, Mele {
GISServerConnection conn = null;
IServerObjectAdmin7 soa = null
conn = new GISServerConnection(); conn.Connect(server);
soa = (IServerObjectAdmin7)conn.ServerObjectAdmin;
IEnumServerObjectConfiguration enumconfig = soa.GetConfigurations();
IServerObjectConfiguration config = enumconfig.Next();
config.WaitTimeout = 600;
while (config != null)
{
//Check to see service is started and not the service with the LIS_Print SOE capability
IServerObjectConfigurationStatus configStatus = soa.GetConfigurationStatus(config.Name, config.TypeName);
if (config.Name != serverObjectHelper.ServerObject.ConfigurationName && configStatus.Status == esriConfigurationStatus.esriCSStarted)
{ if (config.TypeName == "MapServer") { IServerObjectManager4 som = (IServerObjectManager4)conn.ServerObjectManager;
IServerContext serverContext = som.CreateServerContext(config.Name, "MapServer"); IServerObject serverObject = serverContext.ServerObject;
IMapServer3 mapServer = (IMapServer3)serverObject;
GetMapLayerSettings(mapServer, config.Name);
serverContext.ReleaseContext();
}
}
config = enumconfig.Next();
}