gpt4 book ai didi

msdeploy - 使用 msdeploy 从命令行在远程计算机上安装 zip 包

转载 作者:行者123 更新时间:2023-12-02 13:41:23 29 4
gpt4 key购买 nike

我有一个 .zip 包,我想将其从我的开发计算机安装到开发服务器上。所以我使用 msdeploy 来自动执行此操作。

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

但它没有说 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.

但我是第一次尝试安装它!我错过了什么?

最佳答案

例如。 msdeploy api c#. Execute MSDeploy from C# program code like 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());
}

哪里

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

关于msdeploy - 使用 msdeploy 从命令行在远程计算机上安装 zip 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21931058/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com