Server does not support Range Header. But it does!

Topics: Updater Application Block
Sep 18, 2003 at 5:43 AM
originally posted by: swright

I am using the Application Updater Block 2.0 for a self updating application. I am using the BITS downloader. Here is the error message:

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

I have searched here and the web. I also called MS support. We verified that my IIS6 server is correctly handling the "Range" header. I was able to retrieve part of one of the files in the download directory using WFetch from the IIS Resource Kit.

I saw a post here that suggested removing the .config mapping for the site and that didn't help. It just made be get 404 for the config files too.

Bug 00002 in the bug tracker seems to be similar to this problem, but it hasn't been updated in a while.

Event logs don't show anything except what is logged by UAB. The IIS log shows GET records with a status of 206 which seems to be what you get when you use this header. No errors.

Please help!

Senior Architect
Planet Consulting
Sep 20, 2003 at 10:59 AM
originally posted by: EdJez

Hi Steve - have you verified that the BITS stuff is working?
In the BITS help you can see a BITS admin tool that has a get job status function and get job details function that can be used to troubleshoot.
Sep 21, 2003 at 8:31 AM
originally posted by: swright

With Ed and Sudheer's help, I was able to figure out the problem. Here is the solution in case someone else sees this later.

When I first built the application block sample project, it generated PDB files and added them to the “2.0” version of the application to be downloaded. IIS doesn’t serve PDB files by default, so I got 404 errors.

I read a post that said I needed to add a mapping for PDB to get rid of this error. What they meant is that I needed to register PDB as a recognized MIME type. Instead, I registered PDB to be handled by the ASP.NET ISAPI Extension.

This was the component that wasn’t handling the Range header apparently. Instead of returning just the part of the file requested by the Range header, it sent it all. BITS doesn't like that.

When I removed the mapping and added the MIME type as “application/octet-stream”, it worked fine.

Steve Wright
Jan 20, 2004 at 1:24 AM
originally posted by: Trehan

IIS 6.0 support content range header.try removing .exe , .dll, .pdb files from the application mapping extension types from the virtual directory configuration. if this doesn't work try to find out which file doesn't get downloaded.
May 15, 2004 at 5:10 AM
originally posted by: darragh

Hey thanks guys! After banging my head on this one for most of the day yesterday, I was ready to burn a support incident with Microsoft when I stumbled on your post. I added the MIME Type as Steve suggested, and my app was working three minutes later.

This is the kind of stuff that needs to make it into the MS documentation.

Thanks for sharing your hard-earned knowledge,
John Darragh
Brighter Bulb Solutions