473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

File downloader problem

Hi.

I have successfully written an automatic file downloader in VB.NET
using webrequest but I can't find any information anywhere on how to
read in the filename that the server is sending.

Normally the server would specify it using the content-disposition
header, but that is not visible in any of the headers I have found.

The server is definitely sending the filename, as if you download it
using IE, the filename is there.

Any help would be appreciated.

Thanks

Paul
Nov 20 '05 #1
3 1446
* pa**@c360it.co.uk (Paul Porthouse) scripsit:
I have successfully written an automatic file downloader in VB.NET
using webrequest but I can't find any information anywhere on how to
read in the filename that the server is sending.

Normally the server would specify it using the content-disposition
header, but that is not visible in any of the headers I have found.

The server is definitely sending the filename, as if you download it
using IE, the filename is there.


Maybe I am missing something, but when sending a request for a file, you
already know the name of the file to be downloaded...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2l************@uni-berlin.de>...
* pa**@c360it.co.uk (Paul Porthouse) scripsit:
I have successfully written an automatic file downloader in VB.NET
using webrequest but I can't find any information anywhere on how to
read in the filename that the server is sending.

Normally the server would specify it using the content-disposition
header, but that is not visible in any of the headers I have found.

The server is definitely sending the filename, as if you download it
using IE, the filename is there.


Maybe I am missing something, but when sending a request for a file, you
already know the name of the file to be downloaded...


Sorry if I haven't described it properly.

The program is for pulling files off remote servers which I have no
control over. It is also automatic, as it will pull many files off the
server over the course of a day. Therefore I don't know the name of
the files, you just call a particular URL with an ID number and if
there is a file for that ID, it will start the download. (The id you
supply is a number from 10000 to 99999).

Everything is working fine in the program, apart from there is no way
to meaningfully name the files (the files are images).

Thanks.

Paul.
Nov 20 '05 #3
Hi Paul... I made an application using WebRequest, WebResponse and a Stream
to download a file from Internet. Today that file have grown and the download
process is interrumped or timed out constantly. This app does not support
resuming, so I'm now searching for any documentation about resuming and HTTP
file download. As far as I've read I need to use HTTP headers to specify
something like "Content-Range: 10000-12000/25000". I'm surely missing
something because after adding this to the header of my request always gets
me the file from the beggining.

I should really appreciate any help from you if you can direct me to some
documentation about this.

Thanks
Nov 21 '05 #4

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

Similar topics

5
by: | last post by:
I am having a major problem with file transfers - they are ending early when the bandwidth tops-out. Smaller files transfer just fine, but large files (12Mb+) can 'abort' the transfer after maybe...
4
by: Drew | last post by:
I have been looking all over the web for an example of how to accomplish this. I am trying to download a comma seperated file from a https server. I can't establish the connection - the error reads...
2
by: Gregory Hassett | last post by:
Hello, I am using the BITS downloader to retrieve a file as part of a self-updating application. The file is called xyz.dll -- and when BITS tries to get it from its location (where it's...
1
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp"...
1
by: Tarren | last post by:
Hi there: I have figured out how to take the uploaded file from the form input and save it into the database, but I am wondering (and looking for examples) how can I stream the image back to the...
0
by: brian.fairchild | last post by:
I have a downloader page in my asp.net application that looks at a session variable to get the path to the file, checks it then downloads it using the Response object. When the "File Download"...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
0
by: hydroniumf | last post by:
Hi Friends I search a good downloader with high speed that I can add my download URLs list in it via programming in .net. I mean I can control that downloader software via programing (adding list...
5
by: djhexx | last post by:
Hello. I have an ASP.NET application (C#) that I allow users to upload files. Files get stored in a SQL2005 database. The file data is stored in a varbinary(max) column. When the user uploads...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.