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 in Azure by sabby
• 4,350 points
38 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.

answered Apr 11 by Prerna
• 1,940 points

Related Questions In Azure

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 26, 2018 in Azure by null_void
• 3,220 points
26 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
• 56,160 points
989 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 21, 2018 in Azure by club_seesharp
• 3,450 points
353 views
0 votes
2 answers

In Azure powershell Select-AzureSubscription command fetching error: the subscription name doesn't exist

The problem you're having is that the ...READ MORE

answered Aug 16, 2018 in Azure by Priyaj
• 56,160 points
1,097 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 in Azure by Prerna
• 1,940 points
96 views
0 votes
1 answer

How to install Windows Azure Storage Emulator?

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

answered Mar 6 in Azure by Prerna
• 1,940 points
34 views
0 votes
1 answer

Azure Storage Emulator shows error.

This blog might help with your query: http://blog.smarx.com/posts/windows-azure-storage-emulator-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process Also, ...READ MORE

answered Mar 15 in Azure by Prerna
• 1,940 points
44 views
0 votes
1 answer

Friendly filename when downloading Azure blob.

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

answered Mar 15 in Azure by Prerna
• 1,940 points
33 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 in Azure by Prerna
• 1,940 points
47 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 25 in Azure by Prerna
• 1,940 points
110 views