I have a function which extracts a file into a byte array (data).
int contentLength = postedFile.ContentLength; byte[] data = new byte[contentLen
Have you checked the return value from the Read() call to verify that is actually reading all of the content? Perhaps Read() is only returning a portion of the stream, requiring you to loop the Read() call until all of the bytes are consumed.