我已经创建了一个Web部署包(一个ZIP文件),用于托管在ASP.NET 4.5 Web应用程序中的WCF服务。当我尝试部署该包时,出现以下错误:
Child object 'environmentVariables' cannot be added to object 'add'.
The 'add' provider may not support this deployment.
堆栈跟踪如下:
Microsoft.Web.Deployment.DeploymentException: Child object 'environmentVariables' cannot be added to object 'add'. The 'add' provider may not support this deployment.
at Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.UI.InstallProgressWizardPage.OnWorkerDoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
我还没有解决这个问题,但我注意到部署包ZIP文件中的archive.xml有一个<appPoolConfig>元素,里面嵌套了一个<add>元素和<environmentVariables>元素。
源IIS站点在IIS Express中(版本为10,因为我也安装了Visual Studio 2015 RC)。目标IIS版本为7.5(Windows Server 2008 R2)。
Web部署包是在运行于Windows 7的Visual Studio 2013中创建的。程序和功能中安装的WebDeploy版本为3.6(3.1238.1953)。
有人知道如何解决或解决这个问题吗?