c# - Sending Binary Data problem -


I am trying to send binary data from the database to an ASP.Net page. I can see that property data.landa is 2400, that means 2400 bytes, right? The strange thing is that when I get this data, the size is ~ 4kb, and appears to be corrupt. What can be any problem?

  byte [] data = proxy .get data (id); Response.Clear (); Response.AddHeader ("content-displacement", "attachment; file name = data.bin"); Response.AddHeader ("content-length", data-length.tostring ()); Response.ContentType = "app / octet-stream"; Response.Write (data); Response.Flush ();  

There are only 4 overloads of the response. Type:

  write public zero (four f); Write public null (object obj); Write public null (string s); Public Zero Write (four [buffer, int index, int count];  

And I suspect that, your code ( response. (Data) ) Based on this, you are calling object obj overload what you have tried:

feedback. BinaryWrite (data);

This is specifically to write content of the byte array in the output stream.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -