Menu

Getting exception while getting profiles of the onvif cameras.

naveen
2017-01-12
2017-01-17
  • naveen

    naveen - 2017-01-12

    Hi Andrey!

    I am implementing Onvif by using onvif device manager dll.

    I have three cameras:

    1) ReadLeaf - In this i am able to discover the device, get their scopes and profiles and implemented ptz control.

    2) IPNC(Sparsh) - In this i am able to discover the device but when i am trying to get its profiles using GetProfiles() then it is giving me exception.

    Exception is in proxy.EndGetSystemDateAndTime (in GetSystemDateAndTime() method) and in the Device.Async.fs project.

    System.ServiceModel.Security.MessageSecurityException was unhandled by user code
    Message: An exception of type 'System.ServiceModel.Security.MessageSecurityException' occurred in mscorlib.dll but was not handled in user code
    Additional information: The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Digest realm="onvif", qop="auth,auth-int", nonce="586e0f1fca67436c6125", opaque="628c895d"'.

    3) HoneyWell - In this i am able to discover the device but when i am trying to get its profiles using GetProfiles() then it is giving me exception.

    **Exception is in proxy.EndGetProfiles ( in GetProfiles() method) and in the Media.Async.fs project **

    System.ServiceModel.ProtocolException was unhandled by user code
    Message: An exception of type 'System.ServiceModel.ProtocolException' occurred in mscorlib.dll but was not handled in user code
    Additional information: The remote server returned an unexpected response: (400) Bad Request.

    Can you tell me what is the exact problem and what is the solution and why different cameras are behaving differently?

    I have checked honeyWell and IPNC with ONVIF Device Manager and in both the error is

    **The Http request is unauthorized with client authentication scheme 'Anonymous'.
    **

     

    Last edit: naveen 2017-01-12
  • Andrey Vrana

    Andrey Vrana - 2017-01-12

    Hi.

    You need to run every call to ONVIF dll in try-catch block to get the normal error behavior.

    You can cast exception to WebException and read meaningful description.

    You can also (this is preferable way) look on your http traffic with the https://www.wireshark.org/ This tool will help you to get description of the error. This can help you to find the reason.

    Regards,

    Andrey Vrana

     
  • naveen

    naveen - 2017-01-12

    May i send you the wireshark capture file of the cameras to you?

     

    Last edit: naveen 2017-01-12
  • Andrey Vrana

    Andrey Vrana - 2017-01-12

    Yes. Sure. But please use my e-mail: andrey.vrana@gmail.com

     
  • naveen

    naveen - 2017-01-12

    Ok. Thank you.

     
  • naveen

    naveen - 2017-01-17

    Hi,
    Now i have figured out the problem in the IPNC camera. It was due to the difference in the timing of device and client.

     

    Last edit: naveen 2017-01-17
  • naveen

    naveen - 2017-01-17

    Thank you Andrey!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.