On Sep 18, 1:01 pm, chriso <chrisort....TakeThisOut@gmail.com> wrote:
> I am running into problems rewriting urls when the HTTP method is one
> of PUT or DELETE (case sensitive here)
> I have tried ISAPI Rewrite 3 and Ionic Rewrite Filter
>
> I am converting urls from
> /api/v1/customers/1
> to
> /api/v1/customers/1.rails
>
> Everything works well except on PUT and DELETE.
> Variations of PUT and DELETE (Put, pUT,PUt,put etc) all work, it is
> only when the verb is passed all uppercase.
>
> When I view the logs of either rewriter they both indicate that the
> url has been rewritten correctly, but in the IIS log file it displays
> the unwritten url with a 500 status.
>
> It seems as though it must be some IIS setting not allowing PUT and
> DELETE, but I can't find anywhere else to enable it. My .rails
> extension is mapped to ASP.Net 2.0 and is set to allow all verbs.
>
> Any help with this is greatly appreciated.
> Thanks
> Chris
PUT and DELETE are part of WebDAV support hard-wired into IIS.
Depending in IIS version, there are different things necessary to
enable/disable it. There's no one single switch to turn it on/off
because it's part of WebDAV support which required various hooks into
the IIS request processing pipeline -- hence it doesn't quite behave
like any other HTTP verb, no matter what you do -- and that's just how
it works.
In other words, the Application Mapping of .rails allowing "all verbs"
is really "all verbs that don't get processed before that point in the
request pipeline". PUT/DELETE are considered "special" verbs tied to
the "Write" permission setting in IIS (which incidentally has no
direct correlation with being able to write a file on IIS -- to write
a file on IIS require coordination between NTFS permissions and IIS
permissions). Thus, there is no "allow uploads" checkbox in IIS, just
like there is no "allow downloads" checkbox in IIS. client-perceived
behavior like "file uploading" and "file downloading" is a merge of
server-side configuration with no explicit checkbox.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//