Camillia
asked on
Fileupload works but what to do with folders with special permission?
I'm using a Telerik file upload control. This works but we came across an erorr:
"The network path is not found".
After watching users upload file, we noticed the person who was getting this error had the file in a folder with special permissions. This is what the user said...
" that folder it is saved on has special permissions as to accessibility"
And when the user moved the file to a public folder, that's when the upload worked
How can I account for this in the code? Anyway to detect the folder has special permissions and ask the user to move the file to another folder?
"The network path is not found".
After watching users upload file, we noticed the person who was getting this error had the file in a folder with special permissions. This is what the user said...
" that folder it is saved on has special permissions as to accessibility"
And when the user moved the file to a public folder, that's when the upload worked
How can I account for this in the code? Anyway to detect the folder has special permissions and ask the user to move the file to another folder?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Since I'm uploading, should I change the code to
var readPermission = new FileIOPermission(FileIOPer missionAcc ess.Read, file.FileName);
Read...instead of write?
var readPermission = new FileIOPermission(FileIOPer
Read...instead of write?
msdn states :
so ... if you have to read the file from the special folder for uploading in another site yes is reading
if you have to write the file in the special folder you have to check for writing
Read: Read access to the contents of the file or access to information about the file, such as its length or last modification time.
Write: Write access to the contents of the file or access to change information about the file, such as its name. Also allows for deletion and overwriting.
Append: Ability to write to the end of a file only. No ability to read.
PathDiscovery: Access to the information in the path itself. This helps protect sensitive information in the path, such as user names, as well as information about the directory structure that is revealed in the path. This value does not grant access to files or folders represented by the path.
so ... if you have to read the file from the special folder for uploading in another site yes is reading
if you have to write the file in the special folder you have to check for writing
ASKER