Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Camera object. #5

Open
pnandra opened this issue Jan 27, 2021 · 1 comment
Open

Creating Camera object. #5

pnandra opened this issue Jan 27, 2021 · 1 comment

Comments

@pnandra
Copy link

pnandra commented Jan 27, 2021

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
Copy link

Oneiros90 commented Mar 22, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants