简体   繁体   English

TFS:从Windows服务获取最新版本

[英]TFS : Get Latest Version from Windows Service

I'm trying to get the latest version of TFS using Team Foundation Server API. 我正在尝试使用Team Foundation Server API获得最新版本的TFS。 This action I'm trying from a Windows Service with C#, I get error: 我正在尝试使用C#从Windows服务执行此操作,但出现错误:

Workspace [] wss = vcs.QueryWorkspaces (null, vcs.AuthorizedUser,
   System.Net.Dns.GetHostName().ToString ());

TF30063: You are not Authorized to access http://procasproject02:8080/ . TF30063:您无权访问http:// procasproject02:8080 /

But if I do it from a console application, it works well 但是,如果我从控制台应用程序执行此操作,则效果很好

Is it possible to get the latest version of tfs from a windows service? 是否可以从Windows服务获取最新版本的tfs?

Thanks 谢谢

A windows service will be executed under a system user account by default which has not the permission to access your TFS. 默认情况下,Windows服务将在没有访问TFS权限的系统用户帐户下执行。

Try changing the identity under which your service runs or add the missing permissions to your TFS. 尝试更改运行服务的身份,或将缺少的权限添加到TFS。

When you configure a service, by default it runs as the machine system service. 配置服务时,默认情况下,它作为计算机系统服务运行。 Its very rights limited, I don't even think it can use the network. 它的权限非常有限,我什至都不认为它可以使用网络。 You can change it to a network service, or let it use a full machine or domain account in the services applet. 您可以将其更改为网络服务,也可以使其在服务小程序中使用完整的计算机或域帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM