Search code examples
c#aforgeonvif

Close Connection when try connect to IP Camera (with Onvif URL) using AForge?


I want connect using the library AForge.NET to an IP camera with ONVIF Device Service URI similar to this :

http://admin:admin@192.168.1.142/onvif/device_service

but send this error :

the underlying connection was closed: the connection was closed
unexpectedly

How can I work with the ONVIF protocol in AForge.NET?

Thank's


Solution

  • You are connecting to the ONVIF Device Service, not the streaming URI. It's better for you to connect to the camepra with ONVIF Device Manager. If I remeber correctly, when you request the live video, it shows the streaming URI for the video feed.