我使用以下链接设置Hub并连接设备以将数据发送到云。 https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-dotnet
但它给了我以下错误。
任何人都可以帮忙解决这个问题。
d-device>dotnet run
IoT Hub Quickstarts #1 - Simulated device. Ctrl-C to exit.
https://skillmatrix.lnttechservices.com:8080/
Unhandled Exception: System.TimeoutException: Operation timeout expired.
at Microsoft.Azure.Devices.Client.DeviceClient.<>c.<ApplyTimeout>b__74_2(Task t)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at simulated_device.SimulatedDevice.<SendDeviceToCloudMessagesAsync>d__2.MoveNext() in C:\Users\20137539\Downloads\azure-iot-samples-csharp-master\azure-iot-samples-csharp-master\iot-hub\Quickstarts\simulated-device\SimulatedDevice.cs:line 51
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
由于 勒凯什
答案 0 :(得分:0)
如果您在防火墙后面运行,则可能由于代理设置而发生。