These advertisements helps me to keep writing articles on this website

Calling DELETE in a RESTful service gets cancelled in IISExpress

DELETE and IISExpress

I am working on a cross domain client/server solution with HTML5 and ASP.NET. When I finally got GET/POST/DELETE working, I switched from Cassini –the Visual Studio Development Server– to IISExpress. Suddenly DELETE stopped working. A quick inspection in Chrome showed me the request was cancelled:


My best guess is that IISExpress by default allows GET and POST only. I have no access to the target server so I had to find a solution within my project.

Add “runAllManagedModulesForAllRequests”

It turns out that adding this code to my web.config fixed my problem:

<modules runAllManagedModulesForAllRequests="true"/>

If you are stuck on the same problem, I hope it helps you too!

Written by Loek van den Ouweland on July 27, 2012. Questions regarding this artice? You can send them to the address below.
By using this site, you acknowledge that you have read and understand our Cookie and Privacy Policy.