Hi,
We are developing a Server Side Plug-In in a MFA environment.
Starting froma master site we need to get the hostname of all EventServers belonging to all child site.
We are trying to use a code like this:
List items = Configuration.Instance.GetItems();
foreach (Item masterLevelSite in items)
{
try
{
if (masterLevelSite.FQID.Kind == Kind.Server && masterLevelSite.FQID.ServerId.ServerType == ServerId.DefaultServerType)
{
// trovato server di tipo XP cioè il recording server, invio rest
MessageCommunicationManager.Start(masterLevelSite.FQID.ServerId);
MessageCommunication \_messageCommunication = MessageCommunicationManager.Get(masterLevelSite.FQID.ServerId);
EnvironmentManager.Instance.Log(false, "RestService", "RMTServerEndPointFQID: " + \_messageCommunication.ServerEndPointFQID.ToString());
String EventServerAddress = \_messageCommunication.ServerEndPointFQID.ServerId.ServerHostname;
EnvironmentManager.Instance.Log(false, "RestService", "RMTEventServerAddress: " + EventServerAddress );
\_messageCommunication.Dispose();
MessageCommunicationManager.Stop(masterLevelSite.FQID.ServerId);
}
}
catch (Exception ex)
{
EnvironmentManager.Instance.Log(false, "RestService", "Error getting confguration from servere " + [masterLevelSite.Name](https://masterLevelSite.Name) + ": " + ex.ToString());
result += "{error: " + ex.ToString() + "},";
}
}
But the
ServerEndPointFQID.ServerId.ServerHostname seems null and also ServerEndPointFQID semmes don’t has valid values.
Can you help us to understand ?
Many Thanks