尝试以编程方式连接到 TFS 2010 时出现权限错误
我尝试通过 .Net Microsoft.TeamFoundation.Client.TeamFoundationServer
类(在本例中通过 powershell)连接到 TFS 2010。
我为构造函数参数传递了通过 Visual Studio 连接到的相同 URL,以及通过 Security.Principal.WindowsIdentity.GetCurrent()
获取的 Active Directory 凭据。但是,当我调用 Authenticate() 方法时,出现以下错误(我的凭据的子域和用户名)。
调用“验证”时出现异常 “0”参数:“TF50309: 以下帐号还没有 足够的权限来完成 操作:(域)\(用户名)。这 需要以下权限 执行此操作:查看 集合级信息。”
所以,是的,我可以向我们的系统管理员询问此权限是什么,但我不知道为什么需要它;毕竟,我可以通过 Visual Studio 或通过 Web 界面连接到 TFS(通过在 url 后缀“/web”),那么我错过了什么,我无法以编程方式进行身份验证?
额外提示:我们还有一个 TFS2008 服务器 - 遵循与我能够执行的完全相同的过程没有问题地对其进行身份验证
I'm trying to connect to TFS 2010 through the .Net Microsoft.TeamFoundation.Client.TeamFoundationServer
class (in this case through powershell).
I pass in for constructor arguments the same url that I connect to through visual studio, and my Active Directory credential obtained through Security.Principal.WindowsIdentity.GetCurrent()
. However when I call the Authenticate()
method I get the following error (sub DOMAIN and USERNAME for my credentials).
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."
So yes, I can go bug our sysadmin for whatever this permission is but I have no idea why I need it; after all, I can connect to TFS just fine via visual studio, or via the web interface (by suffixing the url with "/web") so what gives? What am I missing that I cannot authenticate programatically?
Extra Hint: We also have a TFS2008 server - following the exact same process I was able to authenticate to it with no problems
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保在连接 URI 中包含项目集合(例如
http://tfs:8080/DefaultCollection
Make sure you include the project collection on your connection URI (e.g.
http://tfs:8080/DefaultCollection