ComputerVisionClient ReadInStreamAsync throws exception forbidden

Tommy G 21 Reputation points
2022-07-13T15:21:07.83+00:00

I am using the ComputerVisionClient to perform OCR on images. The code has been working for 6 months. Starting two days ago the ComputerVisionClient.ReadInStreamAsync started throwing a exception "Operation returned an invalid status code 'Forbidden'". At first is was throwing this exception every couple of calls. Now it seems to be happening every call. I am using a free Azure account so maybe that is the problem, but can't find any information that says thats my problem. Would appreciate any ideas.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
338 questions
{count} votes

Accepted answer
  1. romungi-MSFT 43,656 Reputation points Microsoft Employee
    2022-07-14T07:52:53.43+00:00

    @Tommy G Based on the pattern of the failure it looks like the transactions allowed for free tier might have been exhausted. The free tier comes with a limit of 20 transactions per minute or 5,000 transactions free per month where every call and every feature requested in the request is treated as one transaction. Since you have been using the same for 6 months, has there been any uptick on the number of requests that might have breached the mentioned limit? You can cross check these metrics from the metrics tab of the resource on Azure portal for the specified time range.

    A very quick way to confirm the same, is to update the pricing tier of your resource to S1 tier and check the next response. If the request works, then this is most likely a quota issue of the free tier.

    Other possibilities include rotation of the keys on your resource from the portal which requires your client to use the updated keys. I hope this helps!!

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.


0 additional answers

Sort by: Most helpful