none
Transfer-Encoding Chunked to WCF Service RRS feed

  • Question

  • I have WCF service which is called by multiple Java consumers in prod sending large documents without any issue. The recent new Java consumer is sending Transfer-Encoding as Chunked which is causing WCF service to return 404 error. After looking at the URLScan it was blocking Transfer-Encoding header. I understand that removing that line will fix this issue but couple of questions to fully understand this topic

    1. Is URLScan by default blocking Transfer-Encoding? What is the advantage of doing this? Is Transfer-Encoding harmful header?
    2. What are the side effects of removing Transfer-Encoding from UrlScan? 
    3. Is there any settings we can change at the WCF service level to allow Transfer-Encoding rather than disturbing the entire server level?

    Many thanks.


    Chintan

    Wednesday, March 25, 2015 4:11 AM

Answers

  • Hi Chintan - Strings,

    >>1.Is URLScan by default blocking Transfer-Encoding? What is the advantage of doing this? Is Transfer-Encoding harmful header? 2.What are the side effects of removing Transfer-Encoding from UrlScan? 

    Yes, by default URLScan is configured to reject requests that have a Transfer-Encoding header. Because Chunked-transfer encoding is an HTTP/1.1 feature that transmits the message body in a request or response as chunks that are stamped with their size. HTTP 1.1 allows clients to send POST requests by using chunked-transfer encoding. In most cases, IIS will automatically decode these requests before they are processed. If the size of the request exceeds a particular threshold (by default, 48 KB), then the ISAPI or CGI code to which the request is directed must enable chunked-transfer encoding before the request can be processed correctly. If there is a code running on a server that is receiving POST requests and not sure whether it supports chunked-transfer encoding, so the URLScan will prohibit requests that include a "Transfer-Encoding" header by default. Besides the The URIScan is not effective in tracking the content sizes of a chunked-transfer encoded POST request.
    For more information, please try to refer to:
    http://windowsitpro.com/exchange-server/deploy-urlscan-protect-your-iis-server .

    >>3.Is there any settings we can change at the WCF service level to allow Transfer-Encoding rather than disturbing the entire server level?
    Since the URLScan block the Transfer-Encoding by default, so maybe you need to configure the the URLScan. For more information, please try to refer to:
    http://www.iis.net/learn/extensions/working-with-urlscan/common-urlscan-scenarios .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Thursday, March 26, 2015 5:37 AM
    Moderator