Azure / azure-iot-sdk-csharp

A C# SDK for connecting devices to Microsoft Azure IoT services
Other
470 stars 492 forks source link

Unhandled exception. Microsoft.Azure.Devices.Client.Exceptions.IotHubException: Request 817bda7c-6fc4-40e0-8946-93eb851fcb12 returned status 403 [Bug Report] #3433

Closed addy1997 closed 9 months ago

addy1997 commented 9 months ago

Context

Description of the issue

ON running dotnet run, I get this error (see the screenshot below) image

I'll be thankful for any guidance.

timtay-microsoft commented 9 months ago

Can you share what the sample code being run here is? And can you try using AMQP instead of MQTT to see if you get the same error?

timtay-microsoft commented 9 months ago

Depending on your code, that 403 may be a 403002 which just means you can't send more telemetry today unless you upgrade your Hub to handle more messages per day or it may be 403006 which means you have too many file uploads happening simultaneously.

addy1997 commented 9 months ago

Hi @timtay-microsoft ,

Thanks for replying.

after getting into the directory, when I run dotnet run. It shows this error on Ubuntun but not on Windows.

timtay-microsoft commented 9 months ago

Do you see this 403 error consistently? Or just sometimes?

addy1997 commented 9 months ago

Do you see this 403 error consistently? Or just sometimes?

Sometimes, but when I tried running it on Ubuntu yesterday, it didn't show up.

timtay-microsoft commented 9 months ago

Can you check the Azure Portal to see if your IoT hub has been reaching its daily limit for messages allowed?

addy1997 commented 9 months ago

I am primarily sending these messages to the hub outside my subscription. My daily message quota shows 4,00,000 messages.

ancher788 commented 1 month ago

@timtay-microsoft I'm faced with the same issue on linux based OS, this issue occurs sometimes and my project doesn't fit to these two cases 403002 and 403006. Could you please tell what problem might be?