I am creating RESTful services using web api. My client is an HTML5 / jQuery application. The service and application work fine on IIS 5.1. But when I switch to IIS 7.5, I see that the response contains the Transfer-Encoding: chunked header, and my client does not understand / display the user interface elements (btw this HTML 5 / jQuery stuff is executed by a third party, and I don’t want to change my code. Why should I? In the end, it worked fine until we switched to IIS 7.5). My questions:
- How / Where can I add the “Conetent-Length” HTTP header in the web api so that IIS does not “bite” the encode response?
- Is there a way to disable this site / server level encoding in IIS 7.5?
When I access the service from the browser / fiddler, I get the correct answer (xml / json). I am using Json.net formatting.
source
share