gpt4 book ai didi

.net - 尝试以编程方式连接到 TFS 2010 时出现权限错误

转载 作者:行者123 更新时间:2023-12-01 09:18:16 26 4
gpt4 key购买 nike

我正在尝试通过 .Net Microsoft.TeamFoundation.Client.TeamFoundationServer 类(在本例中通过 powershell)连接到 TFS 2010。

我为构造函数参数传递了我通过 visual studio 连接到的相同 url,以及通过 Security.Principal.WindowsIdentity.GetCurrent() 获得的我的 Active Directory 凭据。但是,当我调用 Authenticate() 方法时,出现以下错误(我的凭据的子域和用户名)。

Exception calling "Authenticate" with "0" argument(s): "TF50309: The following account does not have sufficient permissions to complete the operation : (DOMAIN)\(USERNAME). The following permissions are needed to perform this operation: View collection-level information."

所以是的,无论这个权限是什么,我都可以打扰我们的系统管理员,但我不知道为什么我需要它;毕竟,我可以通过 visual studio 或通过 Web 界面(通过在 url 后缀为“/web”)很好地连接到 TFS,那有什么用呢?我错过了什么,我无法以编程方式进行身份验证?

额外提示:我们还有一个 TFS2008 服务器 - 按照完全相同的过程,我能够毫无问题地对其进行身份验证

最佳答案

确保在连接 URI 中包含项目集合(例如 http://tfs:8080/DefaultCollection

关于.net - 尝试以编程方式连接到 TFS 2010 时出现权限错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4472887/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com