method=DELETE 405 (Method Not Allowed)

1,413 views
Skip to first unread message

con...@voxelarts.com

unread,
Jul 11, 2013, 8:07:04 PM7/11/13
to jquery-f...@googlegroups.com
Hello All,

I'm getting the 405 (Method Not Allowed) error when using the delete method via angular.js. Everything else works fine. I use IIS 7.5 and I assume is something to do with the handler mappings, but I couldn't figure out what. I've change the obvious handler mappings. 

Any ideas?



con...@voxelarts.com

unread,
Jul 11, 2013, 9:07:50 PM7/11/13
to jquery-f...@googlegroups.com
Got it solved!

using the UploadHandler.php

I change the delete type to POST as commented in the code.

// Set the following option to 'POST', if your server does not support
// DELETE requests. This is a parameter sent to the client:
'delete_type' => 'POST',

Nick Deakin

unread,
Oct 18, 2013, 5:52:13 AM10/18/13
to jquery-f...@googlegroups.com
I had this issue as well on a .NET implementation when deployed to an IIS virtual directory. I made some web.config changes:


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 
<appSettings>
   
<add key="StorageRoot" value="C:\temp\" />
 
</appSettings>
 
<connectionStrings />
 
<system.web>
   
<compilation debug="true" targetFramework="4.0" />
   
<httpRuntime maxRequestLength="2097151" executionTimeout="360" />
   
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
       
<customErrors mode="Off"/>
 
</system.web>
 
 
<system.webServer>
   
<handlers>
           
<remove name="SimpleHandlerFactory-ISAPI-2.0-64" />
           
<remove name="SimpleHandlerFactory-ISAPI-2.0" />
           
<remove name="SimpleHandlerFactory-ISAPI-4.0_64bit" />
           
<remove name="SimpleHandlerFactory-ISAPI-4.0_32bit" />
     
<remove name="WebDAV" />
     
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
     
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
     
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
     
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
     
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
     
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
           
<add name="SimpleHandlerFactory-ISAPI-4.0_32bit" path="*.ashx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
           
<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
           
<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
           
<add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />
   
</handlers>
   
<modules>
     
<remove name="WebDAVModule" />
   
</modules>
 
</system.webServer>


 
 
</configuration>

Bit of sledgehammer but i got it working!
Reply all
Reply to author
Forward
0 new messages