Use msdeploy to install the zip package on the remote computer from the command line

I have a .zip package that I want to install on a development server from my development machine. Therefore, I use msdeploy to do this automatically for me.

msdeploy.exe -verb:sync -source:package=Debug_Services_14.02.20.1413.zip -dest:auto,computername=DEVELOPMENTSERVER,username=ADMIN_USER,password=ADMIN_PWD

But this does not mean that ERROR_SITE_DOESNT_EXIST.

Info: Adding sitemanifest (sitemanifest).
Info: Adding createApp (MY_SERVICE).
Info: Adding contentPath (MY_SERVICE).
Error Code: ERROR_SITE_DOES_NOT_EXIST
More Information: Site MY_SERVICE does not exist.  Learn more at: http
://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SITE_DOES_NOT_EXIST.
Error count: 1.

But I'm trying to install it for the first time! What did I miss?

+3
source share
1 answer

For instance. msdeploy api C #. Run MSDeploy from C # code as an API

public static void AppSynchronization(DeploymentBaseOptions depBaseOptions, string       appPath)
{
    var deploymentObjectSyncApp = DeploymentManager.CreateObject(
        DeploymentWellKnownProvider.Package,
        appPath, new DeploymentBaseOptions());

    deploymentObjectSyncApp.SyncTo(DeploymentWellKnownProvider.Auto, string.Empty,
        depBaseOptions, new DeploymentSyncOptions());
}

Where

var deployBaseOptions = new DeploymentBaseOptions
            {
                ComputerName = @"https://WIN-CCDDFDFDFD:8172/msdeploy.axd",
                UserName = @"WIN-CCDDFDFDFD\Al",
                Password = "1212121",
                AuthenticationType = "Basic"
            };
appPath = "C:\mySite.zip";
0
source

All Articles