BACKUP_FAILED Web部署IIS远程服务器。发布失败。 Web部署任务失败。路径中的非法字符

时间:2017-12-05 07:32:26

标签: asp.net .net deployment

如何在部署之前让备份工作。

Windows Server 2008 R2标准版

本地计算机Windows 10 Visual Studio Pro 2017

我可以发布网站。但备份不起作用。

An error occurred when the request was processed on the remote computer.
Illegal characters in path.
   at Microsoft.Web.Deployment.BackupManager.HandleExceptionForBackupFailure(DeploymentBaseContext baseContext, BackupSettings settings, Exception ex, Boolean suppressLogging)

   at Microsoft.Web.Deployment.BackupRuleHandler.PreSync(DeploymentSyncContext syncContext)

   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.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName)
   at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
   at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
   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 CallSite.Target(Closure , CallSite , Object , Object , Object , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at Microsoft.Web.Publishing.Tasks.VSMSDeployObject.SyncTo(VSMSDeployObject destObject, Object syncOptions, IVSMSDeployHost _host)
   at CallSite.Target(Closure , CallSite , VSMSDeployObject , VSMSDeployObject , Object , IVSMSDeployHost )
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.InvokeMSdeploySync()
   at Microsoft.Web.Publishing.Tasks.VSMSDeployDriverInCmd.StartSync()
   at Microsoft.Web.Publishing.Tasks.BaseMSDeployDriver.SyncThruMSDeploy()
   at Microsoft.Web.Publishing.Tasks.VSMSDeploy.Execute()
        VSMSDeploy: Publish failed to deploy.
        Output Property: _PublishResult=False
        Done executing task "VSMSDeploy" -- FAILED.

1 个答案:

答案 0 :(得分:0)

错误是Notepad ++保存了该文件的一个奇怪的副本 C:\ WINDOWS \ SYSTEM32 \ INETSRV \设置\的applicationHost.config 在服务器上。

在常规记事本中打开它,并查看其他内容并修复它: (可能与系统文件被锁定等有关)

<location path="www.xxxxx.com">
        <system.webServer>
            <security>
                <access sslFlags="Ssl" />
            </security>
            <wdeploy>
                <backup enabled="true" backupPath="E:\temp" continueSyncOnBackupFailure="false" />
            </wdeploy>
        </system.webServer>