Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To get PUT and DELETE to be accepted by IIS 7.5 for a PHP 5.4 fast-CGI driven REST API I had to disable the WebDAV-module. Otherwise the WebDAV module intervenes the HTTP requests using PUT or DELETE. To get this working was however a bit confusing and I might have missed some steps or done it in another order.</p> <p>These lines are placed as children of the <code>&lt;system.webServer&gt;</code>-element in <em>web.config</em> in the application root.</p> <pre><code>&lt;modules&gt; &lt;remove name="WebDAVModule" /&gt; &lt;/modules&gt; &lt;handlers&gt; &lt;remove name="WebDAV" /&gt; &lt;/handlers&gt; </code></pre> <p>Hopes this might spare some frustration. It seems like the default setting for the server is to accept any HTTP verb not listed - see settings under <code>Request filtering -&gt; HTTP Verbs -&gt; Edit feature Settings</code>. One may consider to explicitly add the VERBS that are to be allowed. The verbs allowed may be specified appending this snippet, also as a child of <code>&lt;system.webServer&gt;</code>.</p> <pre><code> &lt;security&gt; &lt;requestFiltering&gt; &lt;verbs allowUnlisted="false"&gt; &lt;add verb="GET" allowed="true" /&gt; &lt;add verb="POST" allowed="true" /&gt; &lt;add verb="DELETE" allowed="true" /&gt; &lt;add verb="PUT" allowed="true" /&gt; &lt;/verbs&gt; &lt;/requestFiltering&gt; &lt;/security&gt; </code></pre> <p>On a client machine one can uninstall the WebDAV module from here: </p> <pre><code>Control Panel -&gt; Uninstall Program -&gt; Turn Windows features on or off -&gt; IIS -&gt; World Wide Web Services -&gt; Common HTTP feautre -&gt; WebDAV Publishing </code></pre> <p>The last measure to get it working was by editing <code>applicationhost.config</code> found in <code>C:\Windows\System32\inetsrv\config</code>. Within <code>&lt;system.webServer&gt; -&gt; &lt;handlers&gt;</code> you will see a php entry that has just <code>verb="GET,HEAD,POST</code> - amend it to add the verbs you require, e.g.:</p> <pre><code>&lt;add name="PHP54_via_FastCGI" path="*.php" verb="GET,HEAD,PUT,DELETE,POST"/&gt; | | | append verbs here ----------------------------------------------| </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload