Two things:
- Make sure you dispose the stream (see this post)
- Have you tried taking the file.length from the stream?
Alternatively just use the following code (from the top of my head)
byte[] content = file.OpenBinary();
Muhimbi
2010-10-13 15:01:54