We are using SDK with below statement to trigger alarm at SmartClient alarmManager, it works fine in our development environment.
But, it failed to trigger alarm at our production. Please advise how to solve this problem, thank you.
Log.Debug("fire an alarm eventHeader.ID = " + eventHeader.ID);
Log.Debug("fire an alarm eventHeader.Message = " + eventHeader.Message);
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Server.NewAlarmCommand) { Data = alarm });
Log.Debug("fire an alarm alarm is fired ");
Our log is below;
2023-08-15 16:59:08,111 [DEBUG] - fire an alarm eventHeader.ID = ff271d0e-2029-4363-8884-141aa09b33ec
2023-08-15 16:59:08,111 [DEBUG] - fire an alarm eventHeader.Message = zone36-sensor4 Climb Alarm
2023-08-15 16:59:08,355 [DEBUG] - fire an alarm alarm is fired
We noticed that there is below MIPSDK exception at [C:\ProgramData\Milestone\MIPSDK\MIP20230815.txt](file:C:/ProgramData/Milestone/MIPSDK/MIP20230815.txt)
2023-08-15 16:48:46.184 Debug: LicenseManager ():Licenses: Name=XPIM, Type=XPIM, Counter=1
2023-08-15 16:59:08.354 Error: BaseEventHandler ():Exception source: System.ServiceModel
Exception type: System.ArgumentException
Exception message: The provided URI scheme ‘https’ is invalid; expected ‘http’.
Parameter name: via
Exception target site: ValidateScheme
at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannelCore(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.SecurityChannelFactory`1.OnCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannelInternal()
at System.ServiceModel.ClientBase`1.get_Channel()
at System.ServiceModel.ClientBase`1.get_InnerChannel()
at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.Open()
at VideoOS.Platform.Proxy.AlarmClient.AlarmClientCredentials.OpenClient()
at VideoOS.Platform.Proxy.AlarmClient.AlarmClientManager.GetAlarmClient(ServerId serverId)
at VideoOS.Platform.SDK.Platform.MessageManager.BaseAlarmHandler(Message message, FQID dest, FQID source)