Flex to Image with ASP.NET(C#)

I am getting a problem flex with asp.net. I need to receive byte array from flex and make a image in .net.
When I have used this code in flash(CS3) and .net environment regarding flash sent the byte array and .net made image.

var data = Request.BinaryRead(Request.TotalBytes);
Response.AddHeader(“Content-Type”, “image/jpeg”);
Response.BinaryWrite(data);
Response.End();

But now I am using this code in flex and dotnet . it’s not receive the response date in bytearray
Format. Flex sent the byte array.

Flex is sending something like the following data format :
[
bytesAvailable = 26844
endian = “bigEndian”
length = 26844
objectEncoding = 3
position = 0
]

How should I overcome this situation?
Please let me know if someone have any idea.

Thanks