[英]How to solve system.unauthorizedaccessexception access to the path is denied
I am creating a file from base64 string and while creating file i am getting system.unauthorizedaccessexception if base64 string is image type and it was working fine in remaining file types 我正在从base64字符串创建文件,并且在创建文件时,我正在获取system.unauthorizedaccessexception,如果base64字符串是图像类型,并且在其余文件类型中工作正常
File.WriteAllBytes(imagepath, Convert.FromBase64String(yourBase64String)); File.WriteAllBytes(imagepath,Convert.FromBase64String(yourBase64String));
can any one help me? 谁能帮我?
Thanks in advance 提前致谢
The executable doesn't have access to that file. 可执行文件无权访问该文件。 Run the exe as administrator, or make sure you give it a location that it has access to.
以管理员身份运行exe,或确保为它提供一个有权访问的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.