C# RegistryManager UpdateWinAsync不';t更新报告的属性
我无法让UpdateWinAsync执行任何操作。它不会给出错误。它返回以前报告的状态C# RegistryManager UpdateWinAsync不';t更新报告的属性,c#,.net-core,azure-iot-hub,C#,.net Core,Azure Iot Hub,我无法让UpdateWinAsync执行任何操作。它不会给出错误。它返回以前报告的状态 twin.Properties.Reported["data"] = "test"; Twin updatedTwin = await _registryManager.UpdateTwinAsync(twin.DeviceId, twin, twin.ETag); 我想尽一切办法都试过了 问题的控制台日志: 无法从面向服务的终结点更新报告的设备属性。请参阅更多详细信息。无法从面向服务的端点更新报告的设备属
twin.Properties.Reported["data"] = "test";
Twin updatedTwin = await _registryManager.UpdateTwinAsync(twin.DeviceId, twin, twin.ETag);
我想尽一切办法都试过了
问题的控制台日志:
无法从面向服务的终结点更新报告的设备属性。请参阅更多详细信息。无法从面向服务的端点更新报告的设备属性。查看更多详细信息。我猜它不起作用,我需要使用rest方法吗?我猜它不起作用,我需要使用rest方法?经过反复试验,我把一切都弄明白了。用我的发现写了一个博客。经过反复试验,我把一切都弄明白了。用我的发现写了一个博客。
Got Telemetry for IP Address=xxxxxxx for device=josh-test-device
{"$metadata":{"$lastUpdated":"2020-03-24T16:24:16.8339408Z"},"$version":1}
Setting twin.Properties.Reported to telemetry data for IP Address=xxxxxxx for device=josh-test-device
{"$metadata":{"$lastUpdated":"2020-03-24T16:24:16.8339408Z"},"$version":1,"Brand":"AXIS","ProdFullName":"AXIS P1427-LE Network Camera","ProdNbr":"P1427-LE","ProdShortName":"AXIS P1427-LE","ProdType":"Network Camera","ProdVariant":"","WebURL":"http://www.axis.com/"}
TwinUpdate complete for IP Address=xxxxxxx for device=josh-test-device
{"$metadata":{"$lastUpdated":"2020-03-24T16:24:16.8339408Z"},"$version":1}