Software⏱️ 2 min read📅 2026-05-31

How to Fix: WebAPI Delete not working - 405 Method Not Allowed

405 Method Not Allowed error occurs when a request is made to a resource using an HTTP method that is not supported by the server.

Quick Answer: Check IIS configuration and ensure that the Delete method is enabled for the corresponding resource.

The HTTP Error 405.0 - Method Not Allowed error typically occurs when the web API is configured to only allow specific HTTP methods (e.g., GET, POST, PUT, etc.) but the DELETE request is not included in those settings.

🛠️ Step-by-Step Verified Fixes

Method 1: Enable DELETE Method in IIS

  1. Step 1: Open the IIS Manager and navigate to your web application.
  2. Step 2: Double-click on your web application in the IIS Manager to open its properties page.
  3. Step 3: In the 'HTTP Method' tab, select 'DELETE' as an allowed HTTP method.

Method 2: Update Web API Configuration

  1. Step 1: In your web API controller, update the [HttpDelete] attribute to include the DELETE method.
  2. Step 2: If you are using .NET Core, ensure that you have the '[allowDELETE]' attribute in your Startup.cs file or your WebHostBuilder configuration.

💡 Conclusion

By enabling the DELETE method in IIS and updating your web API configuration, you should be able to resolve the HTTP Error 405.0 - Method Not Allowed error.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions