Hello,
My problem is that File.Exists works fine if my file is on my local
drive but returns false if its on any other drive. I think that the
issue is probably file permissions and so I have tried the following:
FileIOPermision permFileIO = new
FileIOPermissio n(FileIOPermiss ionAccess.Read,
filepath.Value. ToString());
try
{
permFileIO.Dema nd();
}
catch(Exception e)
{
}
This works but how do I catch an exception of the user not having the
right permissions to read the file?
Thanks
Sur
My problem is that File.Exists works fine if my file is on my local
drive but returns false if its on any other drive. I think that the
issue is probably file permissions and so I have tried the following:
FileIOPermision permFileIO = new
FileIOPermissio n(FileIOPermiss ionAccess.Read,
filepath.Value. ToString());
try
{
permFileIO.Dema nd();
}
catch(Exception e)
{
}
This works but how do I catch an exception of the user not having the
right permissions to read the file?
Thanks
Sur
Comment