Hi All,
Quick question, in my program I need to download a large file (100MB)
file. I would like to know how can I do this in segments so that if the
download fails, I will able to download from the the place where the
download fails.
Thanks. 10 5449
Hi,
"DBC User" <db*****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com... Hi All,
Quick question, in my program I need to download a large file (100MB) file. I would like to know how can I do this in segments so that if the download fails, I will able to download from the the place where the download fails.
For this to work you need to control both ends of the transmition, do you?
if so you would have to send in the request the offset from the beginning of
the file, after that is as usual, get the bytes, and append them to the
file.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
I believe you can use HTTP for this. The 1.1 specification has a
provision in it (in the form of a header I believe) which you can set to
indicate where to start the download from. This way, you can indicate which
byte to start at, and then just append to your file.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"DBC User" <db*****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com... Hi All,
Quick question, in my program I need to download a large file (100MB) file. I would like to know how can I do this in segments so that if the download fails, I will able to download from the the place where the download fails.
Thanks.
Hello Nicholas Paldino [.NET/C# MVP], I believe you can use HTTP for this. The 1.1 specification has a provision in it (in the form of a header I believe) which you can set to indicate where to start the download from. This way, you can indicate which byte to start at, and then just append to your file.
Hope this helps.
This header is called "Range". Using it, one can specify one or multiple
byte segments to be retrieved.
Cheers,
--
Joerg Jooss ne********@joergjooss.de
It should be noted that you cannot assume that all servers will allow
this. So in that case you'll need to restart the entire download if the
server you are connecting to doesn't support Range.
--
Benny Raymond http://bloatedcowsoftware.com
Joerg Jooss wrote: Hello Nicholas Paldino [.NET/C# MVP],
I believe you can use HTTP for this. The 1.1 specification has a provision in it (in the form of a header I believe) which you can set to indicate where to start the download from. This way, you can indicate which byte to start at, and then just append to your file.
Hope this helps.
This header is called "Range". Using it, one can specify one or multiple byte segments to be retrieved.
Cheers,
Hello Benny, It should be noted that you cannot assume that all servers will allow this. So in that case you'll need to restart the entire download if the server you are connecting to doesn't support Range.
That's correct. A server that supports Range requests should advertise this
capability using the "Accept-Ranges" header.
Cheers,
--
Joerg Jooss ne********@joergjooss.de
let me see if I understood this correct
I guess I need to have control over both side and I do. (I am writing a
tray item do this task). From the client side, I call a http page to do
the download (Are we taking file copy over http??) as the file copy is
running I keep track of the offset. If the download breaks in the
middle (that is no response from the server or any other failure), I
re-request the file copy, during the request, I will pass the offset in
the http (how can I do that). To make this happen, I have to have the
download server configured to handle accept-ranges (Where do I do
that??).
Thanks.
Hello DBC, let me see if I understood this correct
I guess I need to have control over both side and I do. (I am writing a tray item do this task).
Not really. You just need to identify those servers that accept Range requests.
If a server doesn't support Ranges, you have to repeat the entire download
from scratch.
From the client side, I call a http page to do the download (Are we taking file copy over http??) as the file copy is running I keep track of the offset.
Yes, HTTP. I assumed that sort of blindly after Nicolas' reply.
If the download breaks in the middle (that is no response from the server or any other failure), I re-request the file copy, during the request, I will pass the offset in the http (how can I do that).
Add a Range header to your HttpWebRequest by calling AddRange().
To make this happen, I have to have the download server configured to handle accept-ranges (Where do I do that??).
That depends on the server or the web application (if there's one involved).
What are using? IIS? Apache?
Cheers,
--
Joerg Jooss ne********@joergjooss.de
I am developing this application using .Net C# 2005 and my IIS is
Windows. As I mentioned, I have a tray icon process which runs in the
background and when it sees a request to download, it will start
downloading based on what I find here. I have 6 servers which are
dedicated to do downloading. All are load balanced.
Hi Jorge,
"Not really. You just need to identify those servers that accept Range
requests.
If a server doesn't support Ranges, you have to repeat the entire
download
from scratch. "
In here how can you make the server to support ranges?
Thanks a lot for all the explanation.
Does anyone know how to make the server to support ranges? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ASP Spam Fighter |
last post by:
Hello all,
I don't know how to get around this one... If anybody can help me
with this problem, I would appreciate it very much.
I've been trying to send a (large) file to the browser via a...
|
by: sales |
last post by:
If you are having difficulty downloading large files, please check out
www.Downloads4Dialups.com. Mention this newsgroup in the "Special
Instructions" window on the Shipping Form, and receive a...
|
by: kevin |
last post by:
Hi,
Any help with this would be really appreciated!
I'm trying to download a file from a remote server. The access
permissions is okay but the problem I'm facing is that the file is
getting...
|
by: blantz |
last post by:
I am using Forms Authentication to force a login to a support folder,
where there are large .exe and .zip files for download. In my
web.config file, i am blocking these file extensions with a...
|
by: mwt |
last post by:
This code works fine to download files from the web and write them to
the local drive:
import urllib
f = urllib.urlopen("http://www.python.org/blah/blah.zip")
g = f.read()
file =...
|
by: PiotrKolodziej |
last post by:
hi
I have a thread that downloades a file.
Problem is : Not all files are beeing downloaded. I observed that only the
small files are beeing downloaded correctly. I also cant download two files...
|
by: DBC User |
last post by:
Hello,
I would like to copy a very large file (80MB) from the web, which is
the best approach for downloading such a large file and also how can I
show how much percent completed to user.
I...
|
by: Steve |
last post by:
Hello,
I am a beginner/intermediate c++ coder. I have a program that I am
writing and would like to be able to distribute to some of my
friends. The problem with this is that the data files...
|
by: cyusman |
last post by:
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on...
|
by: keerthyragavendran |
last post by:
hi
i'm downloading a single file using multiple threads...
how can i specify a particular range of bytes alone from a single
large file... for example say if i need only bytes ranging from...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |