Jazea / Onvif.Core

A lightweight ONVIF Discovery and Client library.
MIT License
71 stars 26 forks source link

Creating Camera object. #5

Open pnandra opened 3 years ago

pnandra commented 3 years ago

Why is this When a call a method from OnvifClientFactory (such as OnvifClientFactory.CreatePTZClientAsync(address, username, password);), I an communicate with camera and get the info back BUT when I try to create New Camera object such as var camera2 = Camera.Create(new Account(address,username,password), ex => HandleException(ex)); var camera = new Camera(new Account(address,username,password)); I get this exception: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

address, username, and password are local constants that don't change. Any help would be greatly appreciated. Thanks in advance

Oneiros90 commented 3 years ago

I solved this issue by adding the port to the ip address (e.g. 192.168.1.2:888). But now I'm facing this exception:

System.ServiceModel.ProtocolException: The header 'Security' from the namespace 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' was not understood by the recipient of this message, causing the message to not be processed. This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process. Please ensure that the configuration of the client's binding is consistent with the service's binding.

I'm using the Camera.Create method. Any clue?