How to enable chunked transfer encoding with IIS

Article translations Article translations
Article ID: 278998 - View products that this article applies to.
This article was previously published under Q278998
Expand all | Collapse all

On This Page

SUMMARY

This article describes how to enable chunked transfer encoding with Internet Information Services (IIS).

The HTTP specification does not provide a way to guarantee reliable transmission of replies. The HTTP 1.1 specification adds transfer encoding as a way to make it possible to safely transport messages that are sent through HTTP (see RFC 2068). "Chunked" is a type of transfer encoding by which the message body is transmitted to the client as chunks that are stamped with the size of the chunks (see section 14.40 of RFC 2068). With chunked transfer encoding, the client can make sure that it has received all of the data that the server sends.

Chunked transfer encoding is similar to MIME encoding in relation to Internet mail (see RFC 822). The specific differences between MIME encoding and chunked transfer encoding are discussed in section 19.4 of RFC 2068.

Enable Chunked Transfer Encoding

To enable chunked transfer encoding, set the value for AspEnableChunkedEncoding to True in the metabase for the site, the server, or the virtual directory that you want to enable chunked transfer encoding for. By default, the value is True, and it is set at the Web service level. To set this property in the metabase:
  1. Open a command prompt.
  2. Change to the Inetpub\Adminscripts folder.
  3. Run the following:
    cscript adsutil.vbs set /W3SVC/AspEnableChunkedEncoding "TRUE"
For more information, visit the following MSDN Web site:
AspEnableChunkedEncoding
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/c9b722e8-189f-4bfe-8716-70bf8d2271df.mspx

Send Chunked Data in ISAPI Programming

In Internet Server Application Programming Interface (ISAPI) programming, if you want to send chunked data, add a "Transfer-Encoding: chunked" header, and then send the correctly formatted chunked stream by using InternetWriteFile:
	POST / HTTP/1.1
	Host: x.x.x.x:port
	Connection: keep-alive
	TRANSFER-ENCODING: chunked
				

REFERENCES

For more information, visit the following RFC Web sites:
RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0
http://www.rfc-editor.org/rfc/rfc1945.txt

RFC 2068: Hypertext Transfer Protocol -- HTTP/1.1
http://www.rfc-editor.org/rfc/rfc2068.txt

Note Chunked transfer encoding is defined in section 3.6.
For more information about MIME encoding as it is related to Internet mail, visit the following RFC Web site:
RFC 822: Standard for the Format of ARAP Internet Text Messages
http://www.rfc-editor.org/rfc/rfc822.txt

Properties

Article ID: 278998 - Last Review: December 3, 2007 - Revision: 6.6
APPLIES TO
  • Microsoft Internet Information Services 5.0
  • Microsoft Internet Information Services version 5.1
  • Microsoft Internet Information Services 6.0
Keywords: 
kbhowto kbhowtomaster KB278998

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com