Ajax failed to request webapi on iis

problem description

Local project ajax request get post put delete is normal., get post normal, put delete failed after deployment of iis. Report 405 (Method not Allowed)

related codes

    function del(id) {
        $.ajax({
            url: "api/Products/" + id,
            type: "Delete",
            dataType: "json",
            success: function (data) {
                location.reload();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest + "," + textStatus + "," + errorThrown);
            }
        });
    }
    
    [HttpDelete]
    [ResponseType(typeof(Product))]
    public IHttpActionResult DeleteProduct(int id)
    {
        Product product = db.Product.Find(id);
        if (product == null)
        {
            return NotFound();
        }

        db.Product.Remove(product);
        db.SaveChanges();

        return Ok(product);
    }
    

error details:

Jan.11,2022

the problem has been resolved.
profile removes WebDAV protocol

<system.webServer>
    <modules>
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <remove name="WebDAV" />
    </handlers>
</system.webServer>
Menu