0
votes

I am trying to integrate Jenkins and Web deploy v3.5 over "HTTP" connection. The server has IIS 10 and Windows Server 2016. The build is getting failed with an error,

Web deployment task failed. (Could not complete the request to remote agent URL 'http://IPAddress:8172/MSDeploy.axd?site=WebSite'.)

I am using the following command,

/property:configuration=Dev /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=False /p:AllowUntrusted=True /p:MsDeployPublishMethod=WMSvc /p:MsDeployServiceUrl="http://IpAddress:8172/MSDeploy.axd" /p:DeployIisAppPath="WebSite" /p:AllowUntrustedCertificate=True /p:Username=SomeUsername /p:Password=SomePassword

Troubleshooting:

  1. 8172 port is allowed for Jenkins.
  2. Web deployment services are running.
  3. Users have been given with sufficient rights to the directory.
  4. WebDeploy user is added to administrator group.

I am suspecting if Web deploy tool doesn't work over HTTP connection, is that true?

2

2 Answers

0
votes

Web Deploy is actually just a way of deploying. The services are running on a server and listening on the port 8172. I do not get why you are using a whole web adress, when all you need is the connection to the server (ip or domain only!).

Example: 0.00.000.000 or example.org

Check if you installed the handler too. You need the web deploy service and handler running.

Regards,

Maheshvara

0
votes

I encountered the problem by taking following steps,

  1. Ms web deploy works under the secure connection. it should be called by https://
  2. Configured three rules as mentioned under Management Service Delegation Rule

2.1 ---- createApp with WDeployConfigWriter User

2.2 ---- setAcl

2.3 ---- contentPath_intiApp

Reference: https://docs.microsoft.com/en-us/iis/publish/using-web-deploy/configure-the-web-deployment-handler

  1. In 2.1 step, WDeployConfigWriter user needs to be created manually. Web deploy tool use two users WDeployAdmin and WDeployConfigWriter

Reference: https://blog.richardszalay.com/2013/08/02/manually-creating-wdeployadmin-and-wdeployconfigwriter/