We are trying to integrate Event APIs. Running the example program - LibraryEventGenerator, we get tons of exceptions.

Here are our testing steps:

  1. Create a user-defined event called “OOCamera0001” on our video server
  2. Run LibraryEventGenerator and login our video server
  3. Select a camera​
  4. Fill in the rest info
  5. Click Send Event to Event Server

Here are the exception traces. I’m not sure why the web address is hard-coded in stead of the given address on the login page:

MIP: Error: BaseEventHandler ():************** Inner Exception **************

Exception source: System

Exception type: System.Net.WebException

Exception message: The remote name could not be resolved: ‘demo-milestone.demo.local’

Exception target site: GetRequestStream

at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

at System.Net.HttpWebRequest.GetRequestStream()

at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

************** Outer Exception **************

Exception source: mscorlib

Exception type: System.ServiceModel.EndpointNotFoundException

Exception message: There was no endpoint listening at http://demo-milestone.demo.local:22331/Central/AlarmService2 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Exception target site: HandleReturnMessage

Server stack trace:

at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)

at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.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 VideoOS.Platform.SDK.Platform.MessageManager.BaseEventHandler(Message message, FQID dest, FQID source)

BaseEventHandlerBaseEventHandler ()There was no endpoint listening at http://demo-milestone.demo.local:22331/Central/AlarmService2 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Server stack trace:

at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)

at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)

at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)

at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.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 VideoOS.Platform.SDK.Platform.MessageManager.BaseEventHandler(Message message, FQID dest, FQID source)

This sample shows how to generate and send an EventData event to the Event Server, not a User-Defined Event.

If you want to use User Defined event, then please use the ConfigAccessVia SDK - Trigger button to explore the use of user-defined events.

https://doc.developer.milestonesys.com/html/index.html?base=samples/configaccess_sample.html&tree=tree_2.html

If you want to use AnalyticsEvent please see:

https://developer.milestonesys.com/s/article/exploring-the-MIP-SDK-recommended-top-SDK-samples

http://download.milestonesys.com/MIPSDK/Samples/TriggerAlarmFromExternal-ConceptSolution.pdf