if (server.StartsWith("http://") == false && server.StartsWith("https://") == false)
{
server = "http://" + server;
}
Uri uri = new Uri(server);
CredentialCache _credentialCache = Util.BuildCredentialCache(uri, username, password,"Negotiate");
VideoOS.Platform.SDK.Environment.AddServer(false, uri, _credentialCache);
VideoOS.Platform.SDK.Environment.Login(uri, IntegrationId, IntegrationName, Version, ManufacturerName);
List<Item> items = Configuration.Instance.GetItems(ItemHierarchy.SystemDefined);
I am want to add another server to my plugin. when i add another server using this code It is not adding
If I use VideoOS.Platform.SDK.Environment.Initialize(); It Adds new server but Smart client shows following exception
************** Outer Exception **************
Exception type:System.InvalidCastException
Exception message:Unable to cast object of type ‘VideoOS.Platform.SDK.Platform.SDKEnvironmentManager’ to type ‘VideoOS.RemoteClient.Application.MIP.Manager.SCEnvironmentManager’.
Exception source:VideoOS.RemoteClient.Application
Exception Target Site: GetSidePanelPlugins
at VideoOS.RemoteClient.Application.UI.Panels.ViewModels.PlatformPanelViewModel.GetSidePanelPlugins()
at VideoOS.RemoteClient.Application.UI.Panels.ViewModels.PlatformPanelViewModel.UpdateControls()
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at VideoOS.RemoteClient.Application.Controllers.WorkSpace.WorkSpaceController.FireWorkSpaceChanged(WorkSpaceItem workSpace, Boolean isFromLocalSource)
at VideoOS.RemoteClient.Application.Controllers.WorkSpace.WorkSpaceController.SetWorkSpace(WorkSpaceItem item, Boolean setNewView, IList`1 viewItemStates, Boolean setVideoWall, Boolean notifyListeners, Boolean isFromLocalSource)
at VideoOS.RemoteClient.Application.Controllers.WorkSpace.WorkSpaceController.SetWorkSpace(Guid workSpaceId, Boolean setNewView, IList`1 viewItemStates, Boolean notifyListeners, Boolean isFromLocalSource)
at VideoOS.RemoteClient.Application.UI.WorkspaceTab.WorkSpaceTabViewModel.AsyncChangeWorkspace(WorkSpaceItem oldWorkspaceItem)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)