G
Guest
Hi,
Could someone help me in pointing out what is wrong with this code? This
works as expected in FireFox but not in IE. I have IE 6.0.
I am trying to get a PDF which is hosted on our Intranet, and stream it out
to the Internet users.
Regards,
Amar
WebRequest myRequest = WebRequest.Create("http://intranet/amar/testform.pdf");
WebResponse myResponse = myRequest.GetResponse();
BinaryReader binReader = new BinaryReader(myResponse.GetResponseStream()) ;
byte[] pdfByte =
binReader.ReadBytes(Convert.ToInt32(myResponse.ContentLength));
Response.Clear();
Response.AddHeader("Content-Disposition","attachment;
filename="+"test.pdf");
Response.ContentType="application/pdf";
Response.BinaryWrite(pdfByte);
Response.Flush();
Response.Close();
Could someone help me in pointing out what is wrong with this code? This
works as expected in FireFox but not in IE. I have IE 6.0.
I am trying to get a PDF which is hosted on our Intranet, and stream it out
to the Internet users.
Regards,
Amar
WebRequest myRequest = WebRequest.Create("http://intranet/amar/testform.pdf");
WebResponse myResponse = myRequest.GetResponse();
BinaryReader binReader = new BinaryReader(myResponse.GetResponseStream()) ;
byte[] pdfByte =
binReader.ReadBytes(Convert.ToInt32(myResponse.ContentLength));
Response.Clear();
Response.AddHeader("Content-Disposition","attachment;
filename="+"test.pdf");
Response.ContentType="application/pdf";
Response.BinaryWrite(pdfByte);
Response.Flush();
Response.Close();