谁能解释一下为什么在进行 IO 操作时会发生此错误?
我有一个小型 Windows 应用程序,在此 文章。
在此我想压缩一个sample.txt 文件。 但我收到此错误:
“访问路径‘C:\Documents and Settings\hemanth.vemu\Desktop\Compress’被拒绝。”
请帮助我解决这个问题。
I have a small windows app which was given in this article.
In this I want to to compress a sample.txt file.
But am getting this error:
"Access to the path 'C:\Documents and Settings\hemanth.vemu\Desktop\Compress' is denied."
Please help me regarding this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它的意思正是它所说的。
运行应用程序的帐户对相关文件夹没有正确的权限。
确保您对正在使用的文件夹具有读/写/创建权限。
It means exactly what it says.
The account that the application is running under does not have the right permissions on the folder in question.
Make sure you have read/write/create permissions on the folder you are working with.
您需要向
hemanth.vemu
用户提供应用程序身份验证。您可以使用LogonUser
来执行此操作。它可以验证本地和远程用户。对于本地用户,只需传递计算机名称来代替域即可。You will need to give your application authentication to the
hemanth.vemu
user. You can useLogonUser
to do this. It can validate both local and remote users. For local users simply pass the machine name in place of the domain.