0

I'm building my projects artifact on a team foundation devops server. And in the release definition I want to deploy the artifact with msdeploy, but I'm getting "ERROR_USER_ANAUTHORIZED".

I build the solution with msbuild and use these parameters: /p:Configuration=Release/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=$(build.artifactstagingdirectory) /p:DeployIisAppPath=$(SiteName)

And in the release step I run this cmd command:

-source:package="$(System.DefaultWorkingDirectory)\PROJECT\s.zip" -dest:auto,ComputerName="https://TARGETHOST:8172/msdeploy.axd?site=SITENAME/client" -verb:sync -allowUntrusted

I've followed this walkthrough: "https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-web-deploy-handler" and given the tfs build user all the priveleges it needs but it just doesn't work.

Elias
  • 1
  • Seems that you forgot to add actual login and password to you release step cmd. Here is my cmd for this: -allowUntrusted="True" -verb:sync -source:package="somepathtoziphere.zip" -dest:auto,ComputerName="https://TARGETHOST:8172/msdeploy.axd?site=sitename",UserName="username",Password="pwd",AuthType="Basic" -enableRule:AppOffline – Антон Курьян Feb 21 '20 at 14:51
  • I'm still getting user unathorized after adding the user and password in the cmd – Elias Feb 24 '20 at 10:30
  • Do you use user, which belongs to Administrators? Or have you allowed it in IIS site? – Антон Курьян Feb 25 '20 at 12:14
  • I've put the user in the administrator group but also given it access to the site and application through delegations and authentication – Elias Feb 25 '20 at 12:48
  • Another hint could be to check event log - at Application and Services you could find MsDeploy dedicate log. It shall shed the light on your problem – Антон Курьян Feb 26 '20 at 11:30

0 Answers0