【发布时间】:2015-06-05 11:00:28
【问题描述】:
在 C# .Net 4.5 中使用 this code 连接到我的 IP 摄像机上的 OnVif 服务。
在该代码旁边,我正在尝试获取设备信息,如下所示:
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"'.
我试过this information about Basic realm。通过将 Http 标头 WWW-Authenticate 添加到值为 Basic realm="Our Site" 的请求中。但没有运气。
那是什么鬼?如何解决?
【问题讨论】:
-
请不要在标题中包含语言标签,除非没有它就没有意义。标记用于此目的。
-
感谢您的建议
标签: c# ip-camera digest-authentication onvif