3

I am using Asp.net MVC 4 Web Api project. MY application uses mvc to implement a web site. It makes http requests to the web api to implement server functionality.

Regular page requests to controllers work fine and it is able to display web pages. The application is able to make get and post requests to the api. But when it tries to to put or delete web requests it gets

"Failed to load resource: the server responded with a status of 501 (Not Implemented) "

The application is hosted on iis 6.

The application works when running a local cassani server instance and is able to make put and delete requests, but as soon as the application is executed from iis it doesn't work as expected.

1

1 Answer 1

7

I tried all the suggestions from the comment above and none of them worked.

I had to add the ASP.NET 4.0 dll to the Wildcard mappings in the Configuration area on the Home Directory tab. That worked for me. Remember to uncheck the "Verify file exists" checkbox.

EDIT: I posted a blog on the exact process to make this happen here: http://www.proworks.com/blog/2012/11/14/how-to-fix-aspnet-mvc-web-api-http-put-and-delete-requests-failing/

Sign up to request clarification or add additional context in comments.

1 Comment

Strange. I tried this fix and it worked on one server but not another. Both are identical in setup. On the server which didn't work, a HTTP DELETE gives a 404 error. GET/POST requests are fine. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.