0
votes

I am trying to deploy mvc.net website using jenkins to my local IIS server, for the same I had written windows execute bath command as "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "E:\Heena\Applications\mvctest\mvctest\mvctest.csproj" /T:Build;Package /p:Configuration=DEBUG /p:OutputPath="obj\DEBUG" /p:DeployIisAppPath="/Default Web Site" /p:VisualStudioVersion=14.0

and "C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package="E:\Heena\Applications\mvctest.zip" -dest:auto,computerName='server1',Username='Administrator',Password='server@2016' -allowUntrusted=true

now at the time of build, buil has successed but I am getting an error as Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:04.60

C:\Users\ADMIN.jenkins\workspace\CICD-demo>exit 0 [CICD-demo] $ cmd /c call C:\Users\ADMIN\AppData\Local\Temp\hudson7267586069406813972.bat

C:\Users\ADMIN.jenkins\workspace\CICD-demo>"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package="E:\Heena\Applications\mvctest.zip" -dest:auto,computerName='server1',Username='Administrator',Password='server@2016' -allowUntrusted=true Info: Using ID '06889367-aab0-4054-bee5-b54c98f58119' for connections to the remote server. Info: Adding sitemanifest (sitemanifest). Info: Creating application (192.168.0.47/Testing/) Info: Adding virtual path (192.168.0.47/Testing/) Error Code: ERROR_SITE_DOES_NOT_EXIST More Information: Site '192.168.0.47' does not exist. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SITE_DOES_NOT_EXIST. Error count: 1.

C:\Users\ADMIN.jenkins\workspace\CICD-demo>exit -1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE

1
OP found the answer, without sharing. Cf comment at stackoverflow.com/questions/40381539/… - jpaugh

1 Answers

0
votes

I think this could be because of two things:

  1. See if Web Management Service is running on 8172 and if the Web Deployment Agent Service is running

  2. Try passing SetParameters file (MSBUILD would create this along with a ZIP file) in your Msdeploy command.

"...PATH\IIS\Microsoft Web Deploy V3\msdeploy.exe"- verb:sync- source:package="...AppPATH\obj\Release\Package\Application.zip", -dest:auto,ComputerName="https://RemoteServer:8172/MsDeploy.axd",username="UNAME",password="PWD",authtype="Basic",includeAcls="False" - verb:sync - disableLink:AppPoolExtension - disableLink:ContentExtension - disableLink:CertificateExtension - setParamFile:"...AppPATH\obj\Release\Package\Application.SetParameters.xml" -allowUntrusted'/>

Let me know if this helps!!! cheers :)