0

このコードを使用して、C# .Net 4.5 で 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"'.

Basic realm に関するこの情報を試しました。WWW-Authenticatevalue を使用してリクエストにHttp ヘッダーを追加するBasic realm="Our Site"。しかし、運がありません。

それは一体何ですか?修正方法は?

4

2 に答える 2