Trying to put message in queue & getting 405

Maheswaran Monoharan 70 Reputation points
2024-02-16T08:05:56.0733333+00:00

Hi, I have a console application using .Net 5.0. I have a message that needs to be pushed to Azure Queue. In response, I am getting 405 The resource doesn't support specified Http Verb. User's image

I have tried Base64 encoding as well. sendMessage method, by default, use POST method. If it is CORS, how can I add CORS settings to a Console application Is it possible to do add CORS to a Console application using appsettings.json? The program.cs file looks like this User's image

I tried add settings in appsettings.json but it is not working

User's image

The response message -

<?xml version="1.0" encoding="utf-8"?><Error><Code>UnsupportedHttpVerb</Code><Message>The resource doesn't support specified Http Verb. RequestId:cba2514a-d003-0036-49b8-608db6000000 Time:2024-02-16T09:12:30.0568238Z</Message></Error> Headers: Server: Microsoft-HTTPAPI/2.0 x-ms-request-id: cba2514a-d003-0036-49b8-608db6000000 x-ms-error-code: UnsupportedHttpVerb Date: Fri, 16 Feb 2024 09:12:29 GMT Allow: REDACTED Content-Length: 237 Content-Type: application/xml

Azure Queue Storage
Azure Queue Storage
An Azure service that provides messaging queues in the cloud.
97 questions
{count} votes

Accepted answer
  1. Nehruji R 1,976 Reputation points Microsoft Vendor
    2024-02-19T08:25:36.1466667+00:00

    Hello Maheswaran Monoharan,

    Greetings! Welcome to Microsoft Q&A Forum.

    I understand that you are encountering a 405 error with the message “The resource doesn’t support specified HTTP Verb,” it indicates that the HTTP method you’re using is not allowed for the specific resource.

    Ensure that you are using the correct HTTP verb for the operation. For Azure Queue storage, the supported HTTP verbs are typically PUT (for creating or updating messages) and GET (for retrieving messages) and also check some of the below resources that prove helpful to resolve your issue:

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.    

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Maheswaran Monoharan 70 Reputation points
    2024-02-21T08:45:24.08+00:00

    I am no longer getting this error. Don't know why.

    0 comments No comments