I’ve created a plugin which takes a list of alarm in Smart Client using AlarmClientManager. In SC 2018R1 it works fine, but when I check on version 2016 R2 (10.1a, build 3514) it’s thrown an exception when creating AlarmClient
var _alarmClientManager = new AlarmClientManager();
alarmClient = _alarmClientManager.GetAlarmClient(EnvironmentManager.Instance.MasterSite.ServerId);
throws
===================================
The entry found in AuthenticationManager's CustomTargetNameDictionary for http://{name}:22331/Central/AlarmService does not match the requested identity of VideoOS/{name}:22331. (mscorlib)
------------------------------
Program location
Server stack trace:
at System.ServiceModel.Channels.HttpTransportSecurityHelpers.AddIdentityMapping(Uri via, EndpointAddress target)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.PrepareOpen()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at VideoOS.Platform.Proxy.AlarmClient.AlarmClientCredentials.OpenClient()
at VideoOS.Platform.Proxy.AlarmClient.AlarmClientManager.GetAlarmClient(ServerId serverId)
at SoundIntelClient.Helpers.AlarmHelper.GetAlarmLines()
at SoundIntelClient.Client.SoundIntelViewItemWpfUserControl.Init()
at VideoOS.Platform.Client.ViewItemWpfUserControlWinFormsWrapper.Init()
at VideoOS.RemoteClient.Application.MIP.PlatformContentHolder.Init(String state)
When I copy and paste my code into my other plugin for Management Client(10.1a, build 1375) it works fine. I’ve also checked AlarmEventViewer and it works.
I’m using the same user for MC and SC.
Any tips why it’s not working in SC?