简体   繁体   English

如何解决system.unauthorizedaccessexception对路径的访问被拒绝

[英]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.

相关问题 System.UnauthorizedAccessException:访问路径:拒绝PATH - System.UnauthorizedAccessException: Access to the path:PATH is denied DotNetZip System.UnauthorizedAccessException:拒绝访问路径 - DotNetZip System.UnauthorizedAccessException: Access to the path is denied System.UnauthorizedAccessException:拒绝访问路径“...” - System.UnauthorizedAccessException: Access to the path '...' is denied System.UnauthorizedAccessException拒绝访问路径 - System.UnauthorizedAccessException Access to the path is denied UWP System.UnauthorizedAccessException:拒绝访问路径 - UWP System.UnauthorizedAccessException: Access to the path is denied System.UnauthorizedAccessException:拒绝访问路径“...” - System.UnauthorizedAccessException: Access to the path "..." is denied System.UnauthorizedAccessException:访问路径被拒绝 - System.UnauthorizedAccessException: Access to the path denied System.UnauthorizedAccessException:访问路径拒绝错误 - System.UnauthorizedAccessException: Access to the path denied error FileStream打开图像“ System.UnauthorizedAccessException”,拒绝访问该路径 - FileStream to open an image “System.UnauthorizedAccessException” Access to the path is denied 异常:System.UnauthorizedAccessException,消息:拒绝访问路径“” - Exception: System.UnauthorizedAccessException, Message: Access to the path “” is denied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM