相关疑难解决方法(0)

使用Visual Studios 2010在.NET 4.0中进行ONVIF身份验证

我的任务是尝试与建筑物中的ONVIF摄像机建立通信,最终升级公司的domotic解决方案,以自动识别ONVIF摄像机,并能够设置它们并使用它们的服务.

我已经能够以这种方式收集一些基本信息,如模型,MAC地址和固件版本:

    EndpointAddress endPointAddress = new EndpointAddress("<mycameraurl:<mycameraport>/onvif/device_service");
    CustomBinding bind = new CustomBinding("DeviceBinding");
    DeviceClient temp = new DeviceClient(bind, endPointAddress);
    String[] arrayString = new String[4];
    String res = temp.GetDeviceInformation(out arrayString[0], out arrayString[1], out arrayString[2], out  arrayString[3]);
    MessageBox.Show("Model " + arrayString[0] + ", FirmwareVersion " + arrayString[1] + ", SerialNumber " + arrayString[2] + ", HardwareId " + arrayString[3]);
Run Code Online (Sandbox Code Playgroud)

我在app.config文件中有customBinding的xml规范:

  <customBinding>
    <binding name="DeviceBinding">
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
          messageVersion="Soap12" writeEncoding="utf-8">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding>
      <httpTransport manualAddressing="false" maxBufferPoolSize="524288"
          maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
          bypassProxyOnLocal="false" …
Run Code Online (Sandbox Code Playgroud)

.net c# authentication ws-security onvif

11
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

authentication ×1

c# ×1

onvif ×1

ws-security ×1