你好,笑先生:
这个错误是由于您在尝试将文件保存到磁盘时没有足够的权限导致的。
有几种可能的原因导致这个错误。
例如,您可能没有足够的权限访问该路径,或者该路径可能不存在。
您可能需要确保您有足够的权限访问该路径,或者您可能需要更改保存文件的路径。
尝试以下保存到桌面的代码是否起作用。
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string fileName = Path.Combine(desktopPath, m_namenumber + ".png");
saveImage.Saving(fileName, BingImage.GetBingImageUrl(url));
你需要确保目标地址的存在,并且确保当前用户拥有足够的权限。
你可以尝试右键使用管理员打开应用。
Best Regards,
Jiale
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.