Skip navigation
Currently Being Moderated

HTTP DELETE requests "hanging" when accessing a cfc (but not cfm)

Nov 21, 2012 8:42 AM

I have what appears to be a configuration problem with Coldfusion 10 running on a Windows server with IIS 7.5


I have a javascript function that is sending REST requests to the server.   I am able to make GET, POST,and PUT  HTTP  requests to a REST CFC with no problems.


However, when I send an HTTP  DELETE request to the CFC, the code within the delete function in the CFC executes (the delete query in the function runs), but then I don't get a status code sent back to the browser.   It's not that I get an error status code . . . I get NOTHING.   No status code is returned at all and the request process in the browser just sits there and waits.


Since the code within the function is working, I've tried "forcing" the return of a status code using cfheader.   It doesn't work.


However, if I take the query from the CFC and put it in a file with a CFM extension and call it using the HTTP DELETE method ...I get a 203 status code back right away indicating that the deletion was successful.


Running the same process on a local development server has no problems.   The DELETE request to the CFC works fine.   So, it must be something with the way the production server is configured.


So, the chain of events seems to be


1)  HTTP DELETE request is made to REST on the production server

2)  Coldfusion successfully finds the CFC and executes the code in the correct function

3)  The status code (failure, success, not found ... whatever) gets "lost" and is never sent back to the browser.


The main difference seems to be what extension is on the file name.   It works in a .CFM file but doesn't work when the same code is called from a .CFC file.


I've been banging my head against the desk for hours working on this and just don't know where to go from here (other than write some sort of kludge that uses PUT to execute a delete query).  And since the problem seems to be on my production server I'm very nervous about doing "trial and error" settings changes.

  • Currently Being Moderated
    Nov 21, 2012 8:57 AM   in reply to gtheilman

    Not sure if this will help, or not, but have you tried CFFLUSH after the delete command?



    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 9:23 AM   in reply to gtheilman

    Not sure if this will help either but have you specified any request restrictions in IIS?  In IIS go to your website and click on the Handler Mappings.  You should have one for '*.cfc', '*.cfm', etc.  Double-click your cfc handler '*.cfc' and it should open the Edit Script Map dialog.  That has a Request Restrictions... button on it.  Click that button and you get the Request Restrictions dialog.  Click on the Verbs tab and see how it is configured.  Compare that one to your cfm handler '*.cfm'.  Any differences?



    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 10:43 AM   in reply to gtheilman

    Have you tried monitoring the traffic with something like Fiddler (or something similar)? 

    What status codes/returns do you see?

    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 11:35 AM   in reply to gtheilman

    Since this is happening when calling a cfc, what do you have the returnType set to in your cfc?  And what are you returning from it (if anything)?


    Can you share your cfc's relevant code (including the function declaration)?

    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 11:58 AM   in reply to gtheilman

    To be fair, I have not written any cfc's using the new CF10 attributes 'httpMethod', 'produces' or 'restpath'.  So if I am reading it correctly, you are specifying that the function produces JSON and has a returntype of any but you do not specify a cfreturn.  Have you played around with adding cfreturn and some value?  Or changing the returntype to "void" and just adding <cfreturn /> ?


    Admittedly I am guessing at things here...

    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 12:20 PM   in reply to gtheilman

    Is anything being written to the logs?

    Mark as:
  • Currently Being Moderated
    Nov 21, 2012 6:46 PM   in reply to gtheilman

    Well that’s interesting if you don’t see any indication of the delete request in the IIS logs (while you do see it for the other methods).


    So here are a couple of thoughts.


    - are both your local dev and the remote prod server the same release of CF 10 (same updater level)? You can check in the CF Admin “system information” page (the “I” icon in the top right corner), where it will say 10,0,x where the x will reflect what updater has been added. There could be differences between your two machines that may have an effect

    - since you say there is no request logged in the IIS logs (on prod), that makes me think that that the app pool is crashing when the request is made. Have you applied updater 4 or 5 in prod? Those each address issues that could lead to the IIS app pool crashing. Have you looked in the Windows Event Viewer to perhaps confirm?

    - I’ll assume that CF is not itself crashing on that delete request. Are you doing anything to confirm that? I realize you say you see some output that you are creating, but it could do that before CF might crash, I suppose. Just worth checking.


    - finally, you mention using IIS on the prod machine. What about on Dev? You don’t say, and while we could assume you have it setup also as IIS, you could also be using the built-in web server (port 8500). If you are using IIS on Dev, is it also IIS 7? And might it be in IIS 6 compatibility mode, where the prod box may not be?


    Hope some of that may help.



    Mark as:
  • Currently Being Moderated
    Nov 22, 2012 5:13 AM   in reply to gtheilman

    Charlie the other odd thing here is that the request actually makes it to the cfc and the cfc executes its code successfully. The only missing piece as I understand it is that no return value is sent.


    Right Gary?  Although the only difference between the environments  does seem to be IIS.

    Mark as:
  • Currently Being Moderated
    Nov 22, 2012 5:16 AM   in reply to gtheilman

    Another thought, (I can't verify right now) are those request restrictions available to the isapimodule itself in IIS?  Similar to my previous post for the cfc handler.


    (Sent from mobile device)

    Mark as:
  • Currently Being Moderated
    Nov 22, 2012 1:32 PM   in reply to gtheilman

    Yes, you could run both at once. And it may well be a work-around, but I do hope ultimately that you might solve the problem. I can’t think of anything else for now.





    Mark as:
  • Currently Being Moderated
    Nov 23, 2012 4:46 AM   in reply to gtheilman

    A follow-up edit, with a simplified question. How do you define the cfcomponent tag? In particular, what are the values of the attributes rest and restPath?

    Mark as:
  • Currently Being Moderated
    Mar 11, 2014 12:24 PM   in reply to gtheilman

    Did you solve your trouble? I have exactly the same issue here.

    Mark as:
  • Currently Being Moderated
    Mar 11, 2014 12:40 PM   in reply to e.esquivel

    Never got it to work.   


    The only reason I was using REST at that time was because a 3rd party plugin required it.   I ended up rewriting part of the plugin so it would make use of the HTTP METHODS that were working.


    Other than that one time, I've not used the REST function in ColdFusion.   I just call CFCs the way I did before upgrading to CF10.

    Mark as:
  • Currently Being Moderated
    Mar 13, 2014 3:26 AM   in reply to gdtheilman

    After some hours (close to days) we finally succeeded. After more test to understand .... we still do not really understand.




    The HTTP request with a DELETE verb is pending then canceled when calling a REST service.



    Coldfusion 10

    IIS (7.5,8)

    Windows 7, Windows server 2012 R2




    On colfusion a REST service is setup and it works for PUT,POST,GET verbs.

    The REST service in our case was call via EXTJS 4
    On a development server without IIS it works.

    • Client Side, we changed the call to a POST instead of a DELETE and we had the same symptoms with pending, We try also to solve this issue.
    • Server side on IIS, there are some discussions with Webdav and handlers that have been tested without success. Installing Webdav the server send an error message, that was better than the pending but when we remove webdav Coldfusion return nothing. We try to change the order of the modules and handlers, to add DELETE for all handlers, change the CFC handler settings.
    • I found that the request goes to Colfusion looking some Coldfusion logs.
    • On coldfusion I read the documentation concerning Tomcat, Jakarta. I added IUSR to the folder virtual path folder CFIDE and Jakarta




    Adding "struct body" to the arguments of the method link to delete make it works .


    remote struct function myMethodUsedToDelete(required numeric myArgument restargsource="Path", struct body) httpmethod="delete" restpath="{myArgument }" produces="application/json"  returnformat="json" { }



    I cold not find usefull links or discussions so far.

    Nothing helpfull on the documentation. 518-5719eac51353e6bb244-7fe6.html


    Mark as:
  • Currently Being Moderated
    Mar 14, 2014 6:38 PM   in reply to e.esquivel

    @e, I know you said earlier in the thread (Nov 2012) that you had confirmed that your CF10 was updated (then, and I assume now to 12 or 13).


    But I don’t see that anyone here ever talked about ensuring that your connector (IIS to CF connector) was updated. It’s a common problem for folks to apply CF updates but NOT notice they need to update the connector (after certain of the CF10 updates). Often, Adobe has fixed a bug that simply won’t take effect until you do update the connector.


    I talk more about this matter (why to do it, how to, how to check if you have) in this blog entry:




    Hope that’s helpful.



    Mark as:
  • Currently Being Moderated
    Mar 18, 2014 5:32 AM   in reply to Charlie Arehart

    Thanks Charlie,


    What I did after your remarks.

    I checked if the CF10 was up to date. It was not.
    First, the installation I used was from march 2014 and I was assuming the installation was updated.


    I spend time (too much) to update it, this is what I did.


    • I created a folder C:\ColdFusion10\cfusion\hf-updates
    • I installed the the madatory update ml
      Running the command line in as administrator
      with a command line like so C:\ColdFusion10\jre\bin\java.exe -jar C:\ColdFusion10\cfusion\hf-updates\cf10_mdt_updt.jar
    • Add the proxy setting to the JVM config from the adminsitrator page.
      add after -Dcoldfusion.home={application.home} :
      -Dhttp.proxyHost=<yourproxy> -Dhttp.proxyPort=<yourport>
    • Then I used the administrator page to do the updates
      You can install just the last on (13) in my case in march 2014 it include the previous ones
      CF is now 10,0,12,287689
    • Then I checked the IIS C:\ColdFusion10\config\wsconfig\1\isapi_redirect.dll
      It was modified in march 2012
      I stopped IIS service and CF service
      and I did C:\ColdFusion10\cfusion\bin\connectors\Upgrade_all_connectors.bat
      then I did C:\ColdFusion10\cfusion\bin\connectors\IIS_connector.bat
      I restarted all the services
      I checked the date of C:\ColdFusion10\config\wsconfig\1\isapi_redirect.dll
      it was ‎Saturday, ‎November ‎2, ‎2013, ‏‎2:12:36 PM

    After all that.

    Same symptoms occured. Same solution worked.

    We will do a turnaround with the other troubles not solved we had with a POST.

    reading the updates I saw that some could fix character encoding trouble we had.


    Usefull links ide pdate_cf10_webserver_connector


    Not so usefull but necessary links 3adffe0134c60cd31c-7ffe.html

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points