I often use Azure Web Apps to deploy tools and programs running serverless. A few weeks ago, I deployed an MVC web site with a controller to handle file uploads to an Azure Storage Account. For the client-side, I used jquery-FileUpload, which also allows triggering a controller to delete a file. If a user tries to delete a file, jquery-FileUpload triggers the controller with the http-request method “DELETE”.
In my local environment, this worked as expected but nothing happened in my Azure Web App deployment.
If found out that an Azure Web App supports only http-get and post by default. My first attempt was to add the methods DELETE via web.config:
But this didn’t work. The full web site was no longer accessible:
The page cannot be displayed because an internal server error has occurred.
The right way to add a method/verb is to remove all first and then re-add them: