I am trying to connect a management server with 2022 R3 and It Fails to connect 5 out of 6 times.
I strongly believe that it is because of some thing about new timeout introduced In 2022 R3
2022 R3 release note says that “A ConnectionCheckTimeout key has been added to VideoOS.Platform.EnvironmentOptions”
How to modify or use ConnectionCheckTimeout ?
Is there any option to retry login if it fails ?
VideoOS.Platform.SDK.Environment.Initialize();
VideoOS.Platform.SDK.Log.Environment.Initialize();
Console.WriteLine("VideoOS.Platform.SDK Initialized");
Uri uri = new Uri(ConfigurationManager.AppSettings["VMSServer"].ToString());
Console.WriteLine("Uri for BuildCredentialCache : " + uri.ToString());
VideoOS.Platform.SDK.Environment.RemoveAllServers();
_credentialCache = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, "", "", "Negotiate");
Item siteItem = VideoOS.Platform.SDK.Environment.LoadSiteItem(false, uri, _credentialCache);
if (siteItem != null)
{
Console.WriteLine("siteItem is not null. Name :" + siteItem.Name);
VideoOS.Platform.SDK.Environment.AddServer(false, siteItem, _credentialCache);
}
bool logged = VideoOS.Platform.SDK.Environment.IsLoggedInToAnyServer();
Console.WriteLine("IsLoggedInToAnyServer :" + logged);
try
{
Console.WriteLine("ServerId.Uri :" + siteItem.FQID.ServerId.Uri);
Console.WriteLine("IntegrationId :" + IntegrationId);
Console.WriteLine("IntegrationName :" + IntegrationName);
Console.WriteLine("Version :" + Version);
Console.WriteLine("ManufacturerName :" + ManufacturerName);
VideoOS.Platform.SDK.Environment.Login(siteItem.FQID.ServerId.Uri, IntegrationId, IntegrationName, Version, ManufacturerName);
bool logged2 = VideoOS.Platform.SDK.Environment.IsLoggedInToAnyServer();
Console.WriteLine("IsLoggedInToAnyServer :" + logged2);
}
catch (Exception ex)
{
Console.WriteLine("Error during logging in : ", ex);
Console.WriteLine("Error during logging in, URI : " + uri.ToString() + ex.Message);
VideoOS.Platform.SDK.Environment.RemoveServer(siteItem.FQID.ServerId.Id);
}