473,486 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Peculiar WebRequest behaviour when specifying range with AddRange

I have built a downloading engine that is designed to use the HttpWebRequest
and HttpWebResponse classes to draw files in 64K chunks, rather than pull a
file all at once. This is to ensure that the client is never overtaxed with
huge byte arrays or streams going into memory as the downloaded file is
written out to the file system.

It generally works really well - for image file types, PDF file types, and
raw data formats, I'm ecstatic about how well it works. However there's one
peculiar behaviour, and perhaps somebody has some insight.

For the Microsoft Office formats, the files do not arrive properly - they
are corrupt and unopenable. I've windiffed them against the originals and it
looks like there are huge gaping holes in the files - as though the data
offered by the web server has been truncated. I'm assuming this has
something to do with how IIS handles the mime types for PowerPoint and Excel
(the two formats where I noticed the troubles.)

has anyone got any insight on what might cause this, and how I can draw
these files by ranges?

Thanks,

R.
Apr 20 '06 #1
0 1056

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3596
by: C# Learner | last post by:
Is it possible to create a WebRequest instance and, instead of giving it a URI, give it an actual HTTP request? e.g.: GET / HTTP/1.1 Host: www.google.com CR LF CR LF Thanks in advance.
2
24447
by: George | last post by:
Is there a fast way to transfer an Excel range to an array? Example: Excel range is E2:E300 Dim person() as string Thanks, George
3
8877
by: George | last post by:
Sub ExcelToListBox() Dim xRange As Object Dim ary Dim xValue As String xRange = oXL.Range("A1:A9") 'has letters A-H ary = xRange.value xValue = ary(3, 1) 'xValue = C...
1
2456
by: Richard K Bethell | last post by:
From what I am reading, a System.Net.WebRequest can be set to retrieve just parts of a file in the WebResponse, using the .AddRange method to specify a byte range. This would be very useful for me...
7
5355
by: Rithish | last post by:
Hello. I noticed a strange thing while using strtotime() and date() functions in combination to generate from MySQL into a readable format. By default, the MySQL date field will be 0000-00-00...
33
2295
by: dragoncoder | last post by:
Hi all, Does the following code invoke undefined behaviour ? $ cat a1.cc #include <iostream> #include <limits> int main() { int a = INT_MAX/2;
7
5596
by: Pucca | last post by:
Hi: Below is the error I got from the 2 lines of code below. I don't understand why and how to correct it. The actionMenu.DropDownItems has 0 item in its collection at the time of the code. ...
173
13758
by: Ron Ford | last post by:
I'm looking for a freeware c99 compiler for windows. I had intended to use MS's Visual C++ Express and use its C capability. In the past with my MS products, I've simply needed to make .c the...
5
1778
by: Anders Borum | last post by:
Hello I'm developing an API with a number of concrete collections that inherit from an abstract collection hierarchy. Each inheritance level provides an implementation of IEnumerable<T>, thus...
0
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.