I may not be on IIS, but I am willing to help. You said, "for some reason it looks like its looking up the index.cfm and index.html (which is odd)". This raises 2 questions, which may be related. Firstly, why do you find it odd? Secondly, what is the URL of the CFM page of the request?
The URL i was calling would be index.cfm ( i think it shows this in the log "uri=/index.cfm"). It is odd that it returns both the html for index.cfm and index.htm as it knows which file i have called and should not need to lookup both (it does not behave this way for the second request). In reference to this i did make sure that index.cfm was the only default document in IIS just in case it got confused somehow.
BKBK wrote:
You say it works in Coldfusion 9. Could you please tell us more about the comparable environment in which you use Coldfusion 9? Particularly, the web server and browser / testing tool.
This has worked in all CF9 environments we have had, but the one i had to hand was win7 + IIS7.5. To test this i have been using the google chrome postman extension, Teleric fiddler and i also wrote a quick script to make 100% sure the tools were not borked. The script is here Bug#3822607 - HTTP Post of JSON does not return a response with IIS webserver (submitted by another member of the team).
BKBK wrote:
Two more points stand out from the log:
1) The description of the bad request contains "header Content-Type : application/json" and "header User-Agent : Mozilla/5.0 (Windows NT 6.1; Win64; x64)". The compatibility with Internet Explorer might be an issue.
To test, I ran the following code, as the file testing123.cfm.
<cfheader name="Content-Disposition" value="inline">
<cfcontent type="application/json">
<cfquery name="myQuery" datasource="myDSN">
select id, qty
from myTbl
</cfquery>
<cfoutput>#serializeJson(myQuery)#</cfoutput>
It outputs a JSON. However, while Chrome and Firefox display the content of the page, which is the intention, Internet Explorer insists on offering the file for download as testing123.json. This might be a hint. Is it possible for you to specify the header 'Content-Type : text/plain' or 'Content-Type : text/html' in the test browser / tool?
2) The logs contain the text "table.cfdump_wddx,table.cfdump_xml,table.cfdump_struct, etc.", which looks eerily like like the page output associated with a known bug. The bug was in Coldfusion 9 and occurs when cfdump is used with a file-path as output and format set to html. Given that you use version 9, does this ring any bells? I should hurry to add that that bug was later fixed. (I have tested Coldfusion 11's cfdump quite a bit to confirm).
1) I have only tried in chrome TBH as i am pretty certain the issue lies within or beyond IIS as the request never really makes it back to the browser and when using the CF script the browser should never be involved, BUT it is a straw to clutch so i will definitely try every browser i can find tomorrow to make sure.
2) This is not something i have ever encountered before, but certainly worth looking into. I had presumed that was all just part of the cf debug output cruft you get normally but i should probably try and render the output and see what i get - might give a clue.
ALSO
Some more information about the bug that makes it even odder:
- If you post application/json content type without anything in the body of the request it works fine
- If you post anything - even just {} or a single key pair it breaks
- If you post to a html / asp / php with the same body that breaks the CF it works fine