Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading file and handling response to client

Status
Not open for further replies.

mcowen

Programmer
Oct 21, 2001
134
0
0
GB
Hello,

A couple of questions....

If I make a request to a aspx page and in that page I download a file from a URL, is it possible to pass that file back in the response to the client without saving it to disk on the web server?

If I make a request to an ASPX page can I cancel the response...I do not want a file to be returned at all HTML or otherwise?

TIA

Matt
 
If I make a request to a aspx page and in that page I download a file from a URL, is it possible to pass that file back in the response to the client without saving it to disk on the web server?
If the file you have downloaded is in a stream, you can write that stream directly to the client without saving it first. Is that what you mean?

If I make a request to an ASPX page can I cancel the response...I do not want a file to be returned at all HTML or otherwise?
I don't understand. If you've made a request to a page, why would you suddenly need to have not made the request? Why make it in the first place?


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
That's exactly what I want yes. I shall have a go then.

Good point well made. Unfortunately, I'm working with some legacy software that has a file download function that does not allow you to test the type of file. So every request over http would provide a file and I want a PDF only. I thought to use aspx to check the content type. I think it's best if I do a comparison on the file size.

Thanks very much.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top