Ashx hit from remote client gets 403 error when Delete method is used

I use a jquery loader that works great when running the application from the server. But when I try to delete the downloaded file to a remote server that sends the form with "DELETE" as a method to the ashx file that I implemented. Firebug shows that the request did indeed get to the server, but 403 Forbidden was sent. I have a breakpoint in the Delete segment of the code and it never hits (as expected.)

Given this, I suspect there must be some kind of .NET configuration that I have to do to make it work. When running the application from a browser on a single server, it works fine, so I assume this may be a resolution. Any help please?

+5
source share
1 answer

You need to enable the verb, an example below:

<httpHandlers> 
    <add name="SimpleHandlerFactory-Integrated" path="*.ashx" 
         verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.UI.SimpleHandlerFactory"
         resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
</httpHandlers>

ref: Enabling the PUT Verb with Handlers and IIS 7.0

+3
source

All Articles