Web deploy 3.6: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Yu LinLin 1 Reputation point
2022-03-01T00:48:53.433+00:00

Hi all, I'm trying to migrate from a 2008 R2 x64 server (IIS 7.5) to a 2016 x64 server (IIS 10). No matter how I install web deploy 3.6, for example:

  1. Install web deploy 3.6 through WebPlatformInstaller
  2. Install .Net Framework 4.5.2/.Net Framework 4.6, then install directly from web deploy
    When I export the package via GUI or command line(msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:package=c:\Site1.zip > WebDeployPackage.log), I still get this error:

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

System.FormatException: 索引(从零开始)必须大于或等于零,且小于参数列表的大小。
在 System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
在 System.String.Format(IFormatProvider provider, String format, Object[] args)
在 Microsoft.Web.Deployment.DeploymentException..ctor(Exception innerException, String message, Object[] parameters)
在 Microsoft.Web.Deployment.GenericExceptionBuilder.Create(Object errorLocation, String randomErrorCode)
在 Microsoft.Web.Deployment.ZipEntry..ctor(String path, DeploymentObject source, ZipFile zipFile)
在 Microsoft.Web.Deployment.ZipPackageProvider.Add(DeploymentObject source, Boolean whatIf)
在 Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
在 Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
在 Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
在 Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
在 Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
在 Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
在 Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
在 Microsoft.Web.Deployment.UI.CreateProgressWizardPage.OnWorkerDoWork(Object sender, DoWorkEventArgs e)
在 System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Someone posted a similar issue here, but I still don't know how to fix it.

Any ideas? Thanks!

Windows development | Internet Information Services
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.