Thursday, February 23, 2006

BITS problem solved

The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.

The latest application that I've worked on is a C# WinForms application that incorporates the
Microsoft Updater Application Block to handle automatic updates. For Java developers, this is basically the equivalent of Java Web Start. Under the covers, the Updater Application Block uses BITS (Background Intelligent Transfer System) technology; the same technology that's running when you install a security patch from Microsoft. We encountered the above error with a single client site and it took an incredible amount of time to figure it out, and there was only a smattering of clues published on the web.

The error message may lead you to believe that the problem stems from a misconfiguration on our server. The following is a snippet from BITS documentation:

HTTP Requirements for BITS Downloads

BITS supports HTTP and HTTPS downloads and uploads and requires that the server supports the HTTP/1.1 protocol. For downloads, the HTTP server's Head method must return the file size and its Get method must support the Content-Range and Content-Length headers. As a result, BITS only transfers static file content and generates an error if you try to transfer dynamic content, unless the ASP, ISAPI, or CGI script supports the Content-Range and Content-Length headers.

BITS can use an HTTP/1.0 server as long as it meets the Head and Get method requirements.

To support downloading ranges of a file, the server must support the following requirements:
  • Allow MIME headers to include the standard Content-Range and Content-Type headers, plus a maximum of 180 bytes of other headers.
  • Allow a maximum of two CR/LFs between the HTTP headers and the first boundary string.

But the actual cause in this case was our client's firewall configuration. The firewall (SonicWall pro 5060) was interfering with the response from our server. The solution: our client opened our IP range on their CFS Exclusion List, Gateway AV Exclusion List, IPS Exclusion List, and Anti-Spyware Exclusion List.

Hope this helps someone else out there!


Anonymous said...

Just had this problem with a client downloading content from our content server. I suspect this will solve our problem!

Irene Lydia said...

My C# app uses BITS to download file from a website on the Network.I have set the BITS job as foreground due to the error :"The server does not support the necessary HTTP protocol" when the job was in normal mode.But even when the job was set to foreground I get the error ERROR CODE: 0x80200024 - The job is not making headway. The server may be mi
sconfigured. This server is on the local network.
Can you suggest what might be wrong here? I am able to download the file through HTTPRequest/Response , WebClient downloads etc.
Irene Daniel