0

I have set up a ASP.NET MVC5 project which is built with a TFS Build Service on our build server. After a build is triggered and succeeded, i would like to have the webapplication published to our test system. When I publish through my Visual Studio (2013), it works. But when it tries to publish it after the build of the build service, it gives me the error "user not admin". I even started Visual Studio on the build server and tried to publish a project directly to the test system, this also works... In general we are using TFS 2012, but the Build Service is still 2010 (but if that's a problem, it will be upgraded in the near future).

Does anyone has an idea why the publishing with the build service does not work?

Update: I think the problem might could be that system we try to deploy to is not joined to the domain. So the user which runs the build service (which is a domain user) is not yet in any (local) user groups on the test system.

Regards and thanks for any help

huserben
  • 1,034
  • 1
  • 10
  • 19
  • What user account is the build server running under? Have you given that user account the relevant permissions (e.g. write access to the deployment folder on the web-server) – RB. Feb 14 '14 at 13:26
  • I'm running the build service and the deploy service on the same box (deploying locally to IIS after a build) and have the same problem, you're supposed to be able to specfiy the username and password like this: http://stackoverflow.com/questions/5598668/valid-parameters-for-msdeploy-via-msbuild doesn't work for me though. – War Aug 02 '16 at 15:36

1 Answers1

0

The build agent is the one who is pushing and the build agent either the default network account or a network account you have set up. It does not run under your credentials and it most likely does not have admin access.

So to fix your problem, you need to make sure the account used by TFS has admin permissions.

To view or change this account follow the instructions here:

http://msdn.microsoft.com/en-us/library/ms253062(v=vs.90).aspx

Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74