Sep 21, 2009 at 9:59 PM
Edited Sep 21, 2009 at 10:03 PM
I can create a zip file if I hard code the file path.
If I place the same values into a file array, it fails
filenames = fileList.ToArray()
I have my file name and path stored in a database. I need to read the file name and path and create a zip file to be downloaded.
Yes, the values are the same in the filenames array.
What am I doing wrong?
I have trying reading the file into a memorystream. It works if the path is hard codes, but once I use variables the zip file is damaged. It says the file name are too long. I can open it, but each file name has .... at the end. Again,
if I put the hard code the file path everything is ok.
The files are stored on a network share. I have full permission. Everything works ok if I hard code the path (type it in). If I use variables, the zip file is damaged and can not view it. It has to be something with how my variables
are defined. I have tried Lists, arrays, reading from a database and any other method I could find or think of.