[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

getting binary data with HttpWebRequest/Response

z f

7/7/2004 6:38:00 AM

Hi,

I'm making HTTP request to a dynamic resource no web server.
if i get in the response headers the
Content-Disposition: attachment; filename=...
and
Content-Type: application/msword; name=...

i need to get binary data from web server.
what is the best way to do this?

i got exception
Thread was being aborted

the code i used is
StreamReader stm = new StreamReader( res.GetResponseStream() );
StreamWriter sw = new StreamWriter ( Response.OutputStream );
sw.Write ( stm.ReadToEnd() );

yes, i'm making the request from aspx page on another resource and need to
output the response.
this why the use of new StreamWriter ( Response.OutputStream );

why i get this exception?

TIA,
z.