PUT requests not enabled in Azure

0 votes

I'm working on Azure and building a REST API. When I access an endpoint via PUT method, I get a HTTP 405 "Method Not Allowed" status along with this IIS error message:

The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

How do I enable the PUT method, and other methods that may be blocked by default by Azure's default config settings?

Apr 11, 2019 in Azure by sabby
• 4,370 points
1,358 views

1 answer to this question.

0 votes

You can try adding the following web.config in the system.webServer element:

<handlers>
  <remove name="PHP54_via_FastCGI" />
  <add name="PHP54_via_FastCGI" path="*.php" verb="GET, PUT, POST, HEAD, OPTIONS, TRACE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v5.4\php-cgi.exe" resourceType="Either" requireAccess="Script" />
</handlers>

if you are working with older versions of PHP, you will need to modify the path of the php-cgi handler.

Hope it helps!

To know more, join our Azure Training in Medina today.

answered Apr 11, 2019 by Prerna
• 1,960 points

Related Questions In Azure

0 votes
1 answer

error retrieving default location: Resource group 'MyResourceGroup' could not be found in Azure.

Hi@akhtar, I think you don't have the group ...READ MORE

answered Nov 10, 2020 in Azure by MD
• 95,460 points
1,464 views
0 votes
1 answer

Is there a logical difference between WebApp and API app in Azure?

Basically there was only minute differences between ...READ MORE

answered Apr 27, 2018 in Azure by null_void
• 3,220 points
1,220 views
0 votes
2 answers

Can I Login without prompt in Azure?

You can use -Credential parameter, and DPAPI to login. First, ...READ MORE

answered Aug 17, 2018 in Azure by Priyaj
• 58,020 points
6,552 views
0 votes
1 answer

How can I remove/hide/disable excessive HTTP response headers in Azure/IIS7 without having to use UrlScan?

MSDN published an article on how to ...READ MORE

answered May 22, 2018 in Azure by club_seesharp
• 3,450 points
3,792 views
0 votes
1 answer

Azure has 3 different types of storage accounts. Is there any major difference between them?

Azure Storage provides three types of storage ...READ MORE

answered Mar 4, 2019 in Azure by Prerna
• 1,960 points
26,881 views
0 votes
1 answer

How to install Windows Azure Storage Emulator?

There may be an issue with the ...READ MORE

answered Mar 7, 2019 in Azure by Prerna
• 1,960 points
2,827 views
0 votes
1 answer

Azure Storage Emulator shows error.

Check if you are running BitTorrent/uTorrent or similar ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
1,737 views
0 votes
1 answer

Friendly filename when downloading Azure blob.

Azure blobs can be downloaded in four ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
3,805 views
0 votes
1 answer

How to check if multiple files exist in Azure container?

foreach loop is the most efficient way though. ...READ MORE

answered Mar 4, 2019 in Azure by Prerna
• 1,960 points
3,877 views
0 votes
1 answer

How to pass object messages in Azure Queue Storage?

I already have a base class, so ...READ MORE

answered Mar 26, 2019 in Azure by Prerna
• 1,960 points
3,542 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP