?
Solved

Call webservice from HTTP Delete method in ASP.NET Web API (IIS 6.0)

Posted on 2013-06-27
4
Medium Priority
?
946 Views
Last Modified: 2013-09-09
In my ASP.NET Web API I got this error when running HTTP Delete:

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

After making a wildcard mapping in IIS the HTTP Delete finally works fine (gallery image is correctly deleted ). This is how I made the mapping in IIS:

http://www.proworks.com/blog/2012/11/14/how-to-fix-aspnet-mvc-web-api-http-put-and-delete-requests-failing/

Each time I make a HTTP Post in my Web API I update/delete the cache at the Remote website by calling a webservice (.asmx). That works perfect. But, when I make a HTTP Delete the same webservice call don't work (Remote cache is not updated).

So, my question is:
Why is it not possible to call a external webservice from a HTTP Delete method?
0
Comment
Question by:webressurs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39282977
So you have a Web API action declared in your Web API controller that is decorated with the Delete attribute?

e.g.

public class YourController : ApiController
{
    // Some methods

    [HttpDelete]
    public ActionResult YourDeleteAction()
    {
        // some code
    }

    // Some more methods
}

Open in new window

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39282998
'HTTP Delete' is usually blocked to prevent people from deleting the files that make up your web site.  'Delete webservice.aspx' would be a request to delete your web service page.  http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
0
 
LVL 1

Accepted Solution

by:
webressurs earned 0 total points
ID: 39464300
This error was caused by a failure in the cache procedure (webservice).
0
 
LVL 1

Author Closing Comment

by:webressurs
ID: 39475779
Problem solved by fixing the cache webservice.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question