0 Replies - 2280 Views - Last Post: 25 May 2016 - 06:25 AM

#1 bh0526   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 12-May 15

Problem sending binary stream to browser from web page

Posted 25 May 2016 - 06:25 AM

I have the following C# code to send a file as a binary stream to the browser:
private void Page_Load(object sender, System.EventArgs e)
            //Set the appropriate ContentType.
            Response.ContentType = "application/octet-stream";
            //Get the physical path to the file.
            string FilePath = MapPath("QCMOTOR20.txt");
            //Write the file directly to the HTTP content output stream.

The guy receiving this file claims there are carriage returns at the end of each line. I checked with the guy who created the file and he says there are no CRs at the end of the line. Basically, I just want to send the above as a continuous stream with no CR. But something in my code is putting in the CR. What am I doing wrong?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1