Using content-disposition to download a remote file?

B

Bob Jones

I am using ASP.NET 2.0 w/ c#. I have an Http handler that intercepts
any request labeled .file. I am trying to have this handler serve up a
file from a remote location (public) and I do not want to have read
the file from the remote server first then stream it through my server
to the client.

What I am looking to do is make an HttpHandler tell the browser client
to start downloading a file from a remote location so the bandwidth
used is from the remote server and not my web server.

I have been playing around with content-disposition to make this
happen but it seems that you cannot tell the browser to use a remote
http location to get the file.

Can anyone direct me to hwo I can accomplish this?
 
G

Guest

content-dispostion is used to tell the browser what to do with the response
payload. if you want the browser to get a request to another server, send a
redirect.

-- bruce (sqlwork.com)
 
B

Bob Jones

content-dispostion is used to tell the browser what to do with the response
payload. if you want the browser to get a request to another server, send a
redirect.

-- bruce (sqlwork.com)








- Show quoted text -

That would make sense then. However, I do not want to redirect the
response away from the page I am on. I am trying to make it act like
the user clicked a hyperlink on the page that points directly to the
file on the other server. Maybe there is something else I can do in
order to get the behavior I am looking for?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top