OnVif集成错误-未经授权的客户端身份验证方案“摘要" [英] OnVif integration error - unauthorized with client authentication scheme 'Digest'

查看:470
本文介绍了OnVif集成错误-未经授权的客户端身份验证方案“摘要"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用此代码在C#.Net 4.5中连接到我的IP摄像机上的OnVif服务.
在该代码的旁边,我试图获取设备信息,如下所示:

Using this code to connect to OnVif service on my IP Camera in C# .Net 4.5.
Very next to that code, I am trying to get Device information as follows:

string str = client.GetDeviceInformation(out model, out firmware, out serial, out hardwareId);

处理此错误:

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 'Digest'. The authentication header received from the server was 'Basic realm="CBBA"'.

我尝试了的请求中.但没有运气.

I tried this information about Basic realm. By adding an Http header WWW-Authenticate to the request with value Basic realm="Our Site". But no luck.

那到底是什么?如何解决?

What the heck is that? How to fix it?

推荐答案

我进行了

I had a relevant issue - I had to authenticate with ONVIF cameras for which I did not know the authentication HTTP authentication modes (Basic/Digest). In my answer you can see how to properly iterate through all the HTTP authentication schemes or you can just take the code for Digest, hope it helps.

这篇关于OnVif集成错误-未经授权的客户端身份验证方案“摘要"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆