PUT request on IIS6 exceeding 4GB does not succeed

This is a discussion on PUT request on IIS6 exceeding 4GB does not succeed within the Inetserver forums in Microsoft Tools category; Hi, I'm implementing a HTTP client which uploads data using a plain PUT request handled by the WebDav extension which ships with IIS6. WebDav is the only web service extension which is enabled. Also no other ISAPI filters are installed. My client uploads data using a PUT request with chunked encoding. The header "Transfer-Encoding" is set to "chunked". This implementation works fine for files smaller 4GB but above it fails. When testing with Apache 2.2 my upload code works flawlessly for files larger than 4GB. To rule out the HTTP library used being the source of the problem I've implemented ...

Go Back   Application Development Forum > Microsoft Tools > Inetserver

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 06-29-2007, 04:31 AM
Oliver Tengler
Guest
 
Default PUT request on IIS6 exceeding 4GB does not succeed

Hi,

I'm implementing a HTTP client which uploads data using a plain PUT
request handled by the WebDav extension which ships with IIS6. WebDav is
the only web service extension which is enabled. Also no other ISAPI
filters are installed.

My client uploads data using a PUT request with chunked encoding. The
header "Transfer-Encoding" is set to "chunked".

This implementation works fine for files smaller 4GB but above it fails.
When testing with Apache 2.2 my upload code works flawlessly for files
larger than 4GB.

To rule out the HTTP library used being the source of the problem I've
implemented test code using WinHTTP and Python (which uses WinSocks).
The behavior is identical.
Also directory security is set to Anonymous and NTFS rights allow
everyone to write. No FAT32 is being used.

I transfer chunks of 0.5 GB. What happens if I cross 4GB depends on the
OS IIS6 is running on:
XP 64bit edition and Win2003 server SP2:
IIS stops writing to the file at 4.294.967.295 (which is 2^32-1).
My client code continues sending data until all data is sent. When
receiving the response I get a code 201 (created). But the file is
truncated.

Win2003 server SP1:
The file grows till 4GB then it is suddenly truncated to zero bytes.
After that it takes some time until my client gets the error "The
connection with the server was terminated abnormally" when it tries to
write data to the server.

Is this apparent limit to 4GB a limit of the WebDAV implementation of
MS? I read several times that IIS6 itself has no upload limitations. Is
it configurable?

Thanks for reading!
Best regards,
Oliver Tengler
Reply With Quote
  #2  
Old 07-03-2007, 05:32 AM
Egbert Nierop \(MVP for IIS\)
Guest
 
Default Re: PUT request on IIS6 exceeding 4GB does not succeed


"Oliver Tengler" <otnews@gmx.net> schreef in bericht
news:%23aeuvfiuHHA.2028@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I'm implementing a HTTP client which uploads data using a plain PUT
> request handled by the WebDav extension which ships with IIS6. WebDav is
> the only web service extension which is enabled. Also no other ISAPI
> filters are installed.
>
> My client uploads data using a PUT request with chunked encoding. The
> header "Transfer-Encoding" is set to "chunked".



Here you got an answer from Wade A. Hilmo (MS)

....
ISAPI is limited to 4GB of content-length because the pECB->dwTotalBytes
member is only 32 bits. There is code (at least in IIS 6) that checks for
an overflow when the textual content-length header is mapped into that
member of the ECB. You are probably seeing a failure due to that overflow.

If you want to send more than 4GB in a request entity body, then you should
use chunked transfer encoding for the request. In this case, there is no
content-length header for IIS to map (and the dwTotalBytes member gets set
to 0xffffffff.)
....

> This implementation works fine for files smaller 4GB but above it fails.
> When testing with Apache 2.2 my upload code works flawlessly for files
> larger than 4GB.
>
> To rule out the HTTP library used being the source of the problem I've
> implemented test code using WinHTTP and Python (which uses WinSocks). The
> behavior is identical.
> Also directory security is set to Anonymous and NTFS rights allow everyone
> to write. No FAT32 is being used.
>
> I transfer chunks of 0.5 GB. What happens if I cross 4GB depends on the OS
> IIS6 is running on:
> XP 64bit edition and Win2003 server SP2:
> IIS stops writing to the file at 4.294.967.295 (which is 2^32-1).
> My client code continues sending data until all data is sent. When
> receiving the response I get a code 201 (created). But the file is
> truncated.
>
> Win2003 server SP1:
> The file grows till 4GB then it is suddenly truncated to zero bytes. After
> that it takes some time until my client gets the error "The connection
> with the server was terminated abnormally" when it tries to write data to
> the server.
>
> Is this apparent limit to 4GB a limit of the WebDAV implementation of MS?
> I read several times that IIS6 itself has no upload limitations. Is it
> configurable?
>
> Thanks for reading!
> Best regards,
> Oliver Tengler


Reply With Quote
  #3  
Old 07-09-2007, 10:20 AM
Oliver Tengler
Guest
 
Default Re: PUT request on IIS6 exceeding 4GB does not succeed

Egbert Nierop (MVP for IIS) wrote:
>
> "Oliver Tengler" <otnews@gmx.net> schreef in bericht
> news:%23aeuvfiuHHA.2028@TK2MSFTNGP04.phx.gbl...
>> Hi,
>>
>> I'm implementing a HTTP client which uploads data using a plain PUT
>> request handled by the WebDav extension which ships with IIS6. WebDav
>> is the only web service extension which is enabled. Also no other
>> ISAPI filters are installed.
>>
>> My client uploads data using a PUT request with chunked encoding. The
>> header "Transfer-Encoding" is set to "chunked".

>
>
> Here you got an answer from Wade A. Hilmo (MS)
>
> ...
> ISAPI is limited to 4GB of content-length because the pECB->dwTotalBytes
> member is only 32 bits. There is code (at least in IIS 6) that checks for
> an overflow when the textual content-length header is mapped into that
> member of the ECB. You are probably seeing a failure due to that overflow.
>
> If you want to send more than 4GB in a request entity body, then you should
> use chunked transfer encoding for the request. In this case, there is no
> content-length header for IIS to map (and the dwTotalBytes member gets set
> to 0xffffffff.)
> ...

Thanks for the answer.
This is exactly what I am doing. I sent my request with chunked transfer
encoding. But even this doesn't help to exceed 4GB.
>
>> This implementation works fine for files smaller 4GB but above it
>> fails. When testing with Apache 2.2 my upload code works flawlessly
>> for files larger than 4GB.
>>
>> To rule out the HTTP library used being the source of the problem I've
>> implemented test code using WinHTTP and Python (which uses WinSocks).
>> The behavior is identical.
>> Also directory security is set to Anonymous and NTFS rights allow
>> everyone to write. No FAT32 is being used.
>>
>> I transfer chunks of 0.5 GB. What happens if I cross 4GB depends on
>> the OS IIS6 is running on:
>> XP 64bit edition and Win2003 server SP2:
>> IIS stops writing to the file at 4.294.967.295 (which is 2^32-1).
>> My client code continues sending data until all data is sent. When
>> receiving the response I get a code 201 (created). But the file is
>> truncated.
>>
>> Win2003 server SP1:
>> The file grows till 4GB then it is suddenly truncated to zero bytes.
>> After that it takes some time until my client gets the error "The
>> connection with the server was terminated abnormally" when it tries to
>> write data to the server.
>>
>> Is this apparent limit to 4GB a limit of the WebDAV implementation of
>> MS? I read several times that IIS6 itself has no upload limitations.
>> Is it configurable?
>>
>> Thanks for reading!
>> Best regards,
>> Oliver Tengler

>

Reply With Quote
  #4  
Old 09-03-2008, 10:16 AM
Christina Pildner
Guest
 
Default Set chunked trandfer

Hello Oliver,

how can i set the chunked transfer in iis?( I got the same problem you describe)
Reply With Quote
  #5  
Old 09-04-2008, 04:32 AM
Anthony Jones
Guest
 
Default Re: Set chunked trandfer

"Christina Pildner" wrote in message news:200893101635c.pildner@web.de...
> Hello Oliver,
>
> how can i set the chunked transfer in iis?( I got the same problem you
> describe)


What problem would that be?
Why would you want chunked transfer?

--
Anthony Jones - MVP ASP/ASP.NET

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 02:38 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.