将 NAnt 与 CCNet 结合使用的 System.UnauthorizedAccessException
我试图将文件复制到“\\serverA\destination\file”等网络路径,但因未经授权的访问异常而失败。我尝试过更改ccnet服务登录帐户,但没有结果。 如果我从控制台运行此任务,它就会执行。
任何建议将不胜感激。谢谢
I'm trying to copy file to network path like '\\serverA\destenation\file', but fail with Unauthorized Access exception. I have tried change ccnet service LogOn account, but without results.
If I run this Task from console, it does executes.
Any advise would be appreciate. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 ccnet 服务作为本地系统帐户运行,它将没有任何网络权限。尝试将服务配置为以您的帐户运行。如果成功,您应该创建或查找一个用户,该用户既具有访问网络资源的适当权限,又遵守 最小权限原则
If the ccnet service is running as Local System account, it won't have any network permissions. Trying configuring the service to run as your account. If that succeeds, you should then create, or find, a user that both has the appropriate rights to access the network resource and adheres to the principle of least privilege