D
Dan
I have code like the following to test for existence of a file. I know the
file is there, but File.Exists returns FALSE. The problem appears to be
that the file is in a directory beneath "My Documents". When I move it to a
directory directly under the root, File.Exists returns TRUE. So I tried
using FileIOPermission to give me rights to read it, but still no luck. Any
suggestions? Thanks...
FileIOPermission f = new
FileIOPermission(FileIOPermissionAccess.AllAccess, fileName);
if (!File.Exists(fileName))
throw new FileNotFoundException("Unable to construct
BinaryUploadFile object. File does not exist:\n\n" + fileName + "\n\n");
file is there, but File.Exists returns FALSE. The problem appears to be
that the file is in a directory beneath "My Documents". When I move it to a
directory directly under the root, File.Exists returns TRUE. So I tried
using FileIOPermission to give me rights to read it, but still no luck. Any
suggestions? Thanks...
FileIOPermission f = new
FileIOPermission(FileIOPermissionAccess.AllAccess, fileName);
if (!File.Exists(fileName))
throw new FileNotFoundException("Unable to construct
BinaryUploadFile object. File does not exist:\n\n" + fileName + "\n\n");