Hello!<BR><BR>I&#039;m trying to stream an image file to a browser. When a byte range is passed to it through the headers, it should stream from that byte to the end of the file and return "Content-Length" as the length of the file minus the start byte for the file. Unfortunately, the "Content-Length" is returning incorrectly. I&#039;m using ethereal to view the actual headers coming through, but "Content-Length" isn&#039;t changing. For the longest time, it was just the full size of the image file, but I turned off caching in IIS and now it&#039;s just some arbitrary number. This is my code:<BR><BR>public void ProcessRequest(HttpContext ctx) <BR>{<BR> string fileName = "C:\test.jpg";<BR> <BR> int startByte = 0;<BR> FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);<BR> int endByte = Convert.ToInt32(fs.Length);<BR><BR> int fileByteSize = endByte - startByte;<BR> response.AppendHeader("myHeader","test");<BR> response.AppendHeader("Content-Length",fileByteSize.ToString());<BR> response.ContentType = "image/jpeg";<BR> response.ContentType = "application/octet-stream";<BR><BR><BR> BinaryReader r = new BinaryReader(fs);<BR> try <BR> {<BR> fs.Seek(startByte, SeekOrigin.Begin);<BR><BR> Stream os = response.OutputStream;<BR> response.AppendHeader("Content-Length",fileByteSize.ToString());<BR> for (int i=startByte; i&#060;(endByte-1); i++)<BR> {<BR> os.WriteByte(r.ReadByte());<BR> }<BR> }<BR>}<BR><BR><BR>myHeader = test is going into the header correctly. My thought is where I do the appendheader for Content-Length isn&#039;t correct and that it reads Content-Length off of the stream length which would mean my stream is incorrect. Does anyone see a problem with the code here?<BR><BR>Thanks MUCH for your help!<BR>Meg