0
votes

I am trying to build and deploy a .NET application to my local machine IIS. I am using Jenkins for build and deploy.

My requirement is Jenkins should build the application using MSBuild.exe and deploy the publish profile to localhost IIS.

Now i am able to build the code successfully and also able to deploy to localhost IIS manually by copy paste the publish profile to the localhost IIS site path.

I do not want to manually copy paste the publish profile to the localhost IIS but it should be automatically by the Jenkins. As soon as the build completed it should put the publish profile at the desired localhost IIS path. For achieving this i am running the given windows batch command inside Jenkins.

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb=sync -source:package="C:\Users\robin.j\.jenkins\workspace\DotNetMVCTFS\JenkinsPOC\obj\Release\Package\JenkinsPOC.zip" -dest:auto,computerName=http://172.27.113.81:7575/msdeploy.asd?site=MvcJenkinsAutoDeploy,username=username=deploy\robin.j,password=*,authType=basic -setParam:"IIS Web Application Name"="MvcJenkinsAutoDeploy" -allowUntrusted=true

Now the problem is on each successful build i am getting the below error while deploying the application to the localhost IIS.


Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:08.83 [DotNetMVCTFS] $ cmd /c call C:\Users\robin.j\AppData\Local\Temp\jenkins8482033175218488444.bat

C:\Users\robin.j.jenkins\workspace\DotNetMVCTFS>"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb=sync -source:package="C:\Users\robin.j.jenkins\workspace\DotNetMVCTFS\JenkinsPOC\obj\Release\Package\JenkinsPOC.zip" -dest:auto,computerName=http://172.27.113.81:7575/msdeploy.asd?site=MvcJenkinsAutoDeploy,username=deploy\robin.j,password=#### -setParam:"IIS Web Application Name"="MvcJenkinsAutoDeploy" -allowUntrusted=true Info: Using ID '0b4c591b-19f6-4ec2-bcac-d3f77279eec4' for connections to the remote server. Error Code: ERROR_DESTINATION_INVALID More Information: Could not connect to the remote computer ("http"). Make sure that the remote computer name is correct and that you are able to connect to that computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_INVALID. Error: The remote name could not be resolved: 'http' Error count: 1.


My local machine IIS site is running on http://172.27.113.81:7575

Please suggest me to know what is the issue here.

1
Kindly post code, logs, and errors in text instead of images.Talha Junaid
You need to make it sure that you are following all the steps defined ERROR_DESTINATION_NOT_REACHABLE guide.Talha Junaid

1 Answers

0
votes

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb=sync -source:package="C:\Users\robin.j.jenkins\workspace\DotNetMVCTFS\JenkinsPOC\obj\Release\Package\JenkinsPOC.zip" -dest:auto -setParam:"IIS Web Application Name"="Default Web Site" -allowUntrusted=true

The above batch command works!! No need to specify destination server name for local while publishing web deploy package.