Microsoft KB Archive/810957

= You receive more than one &quot;400 bad request&quot; response to one HTTP request in IIS =

Article ID: 810957

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Internet Information Services 5.0

-





SYMPTOMS
If data that is longer than 49,155 bytes is posted to Microsoft Internet Information Services (IIS) 5.0 or IIS 5.1, and the receiving application does not completely read the data, IIS returns the following HTTP error message to the client:

400 - Bad Request



CAUSE
When IIS receives data that is to be passed to an Internet Server API (ISAPI) extension such as Active Server Pages (ASP), IIS reads ahead a certain number of bytes and then puts this data in a buffer. Any additional data remains in the network socket and waits to be read. If the receiving application does not read the additional data when the application finishes processing, the remaining data is interpreted as the start of another request from the client.



RESOLUTION
To resolve this problem, make sure that the application reads all the data that the client sends. For example, the data can be read in ASP by using the 'Request.BinaryRead(Request.TotalBytes)' method.



STATUS
This behavior is by design.



MORE INFORMATION
The IIS UploadReadAheadSize metabase property determines the amount of data that IIS reads ahead and buffers for a request for an ISAPI extension. By default, this value is 49152.

Additional query words: IIS buffer 400 'bad request' UploadReadAheadSize 49152

Keywords: kberrmsg kbprb KB810957

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.