I am making an HTTP connection to an IIS web server and sending a POST request with the data encoded using Transfer-Encoding: chunked. When I do this, IIS simply closes the conn
Take a look at your client.
Both IIS & Apache support POST requests using chunked transfer-encoding. You can verify this using the curl utility:
curl --form "upfile=@" --header "Transfer-Encoding: chunked"
Verify the transfer is chunked using Wireshark