Hi
I am all ready fetching files from the local file system using
Response.TransmitFile(filePath);
and I eaither set this to make the save as dailog appear
Response.AppendHeader("Content-Disposition", " attachment; filename=" +
fileName);
or this to make the brouser to try and load it
Response.AppendHeader("Content-Disposition", " inline; filename=" +
fileName);
My problems come when the file I want to return is not the local file
but been returned by a remote service
I was just have problems get the streaming to work and have been able
to find any examples of this been done
will WebClient.DownloadData work with DPF/DOC files
Thanks for you help Paul
I do like the idea of change this into a ashx page when it is all
working
On Dec 11, 2:21 pm, "Dave Sexton" <dave@jwa[remove.this]online.com>
wrote:
Hi Paul,
What I an expecting is a pdf/doc file if the file is found else I will
get an HTML error pageIt doesn't sound to me like you're using a Web Service at all then :)
It sounds to me like you're simply making an HTTP request for a document
directly to a web server, in which case Marc's solutions are good ones.
I do wish to be able to forse the file into dowmload mode ie. havw to
links per file download - viewIt's not clear to me what you want here. Do you mean asynchronous
downloads?
some of these file will be big so I do need to be carefull not to
overload the server etc.
So It might be safer to write to the file systemWell, if you're going to be downloading the complete files into memory
anyway then writing them to disc will actually be more of a burden on the
server. Marc's suggestion about downloading large files in chunks seems
like it might be appropriate for your situation. Just write each chunk to
the Response.OutputStream one at a time. The size of the chunks should
depend on the available resources of the system that is hosting your
application, although you'll probably be able to get away with hard-coding
some size like 0x20000.
--
Dave Sexton