0
votes

I'm trying to get the latest version of TFS using Team Foundation Server API. This action I'm trying from a Windows Service with C#, I get error:

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

TF30063: You are not Authorized to access 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?

Thanks

2
Is the service running with the same credentials as the console app?Sir Crispalot

2 Answers

3
votes

A windows service will be executed under a system user account by default which has not the permission to access your TFS.

Try changing the identity under which your service runs or add the missing permissions to your TFS.

0
votes

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.