Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • In my question, I have mentioned that the byte array is not reading from any file on server. It is just an byte array I got from database or other source. So please do not read file directly into FileStream. Commented Mar 8, 2013 at 11:04
  • Why So please do not read file directly into FileStream? You're using Server.MapPath("~/Files/" + fileName) to read the file on disk. Don't use FileStream on that if you don't intend to read any files on disk. Commented Mar 8, 2013 at 11:06
  • You right. I only have byte array and it isn't loaded from any file. So can you help me with this? Because the method "LoadFile" require a FileStream, and I just have a byte array from database. So how can I use it for my method "LoadFile"? Commented Mar 8, 2013 at 11:10