How to use WebDeploy with ASP.Net core
<p>We have an Update-Program that publishes automatically WebDeploy-Packages to IIS-Servers. This Program works fine with MVC 5 - Applications but not with .Net Core Applications. We Use the Microsoft.Web.Deployment - API and my publish method looks like this:</p>

<pre><code>private void UpdateIIS(DTOs.ApplicationConfiguration.ApplicationServer applicationServer, DTOs.Update.Update update) {
    // SSL-Zertifikatsfehler ignorieren
    System.Net.ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(
        (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) =&gt; { return true; });
    var sourceBaseOptions = new DeploymentBaseOptions();
    var destBaseOptions = new DeploymentBaseOptions() {
        ComputerName = string.Format("https://{0}:{1}/msdeploy.axd?site={2}", applicationServer.Adresse, applicationServer.MSDeployPort, applicationServer.SiteName),
        UserName = applicationServer.User,
        Password = applicationServer.Passwort,
        AuthenticationType = "Basic"
    };
    string updatePackage = Directory.GetFiles(update.UpdateDirectory, "*.zip").FirstOrDefault();
    if (!File.Exists(updatePackage)) {
        throw new Exception("Update-Paketdatei nicht gefunden");
    }
    using (var deploymentObject = DeploymentManager.CreateObject(
        DeploymentWellKnownProvider.Package,
        updatePackage,
        sourceBaseOptions)
    ) {
        if (deploymentObject.SyncParameters.Count &gt; 0) {
            deploymentObject
            .SyncParameters
            .Single(p =&gt; p.Name == "IIS Web Application Name")
            .Value = applicationServer.SiteName;
        }


        var syncOptions = new DeploymentSyncOptions();
        var changes = deploymentObject.SyncTo(
            DeploymentWellKnownProvider.Auto,
            "",
            destBaseOptions,
            syncOptions
        );
    }
}
</code></pre>

<p>I get no errors, but the Website doesn't change.</p>