使用WebDeploy(MSDeploy)部署到Microsoft Azure网站目标不起作用 [英] Using WebDeploy (MSDeploy) to deploy to a Microsoft Azure Website target doesn't work

查看:239
本文介绍了使用WebDeploy(MSDeploy)部署到Microsoft Azure网站目标不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Visual Studio 2015的发布"功能将Web应用程序部署到Azure网站/应用程序服务登台插槽,并且收到以下错误:

I'm trying to deploy my web app via Visual Studio 2015's "Publish" functionality to an Azure website/app service staging slot and I receive the following errors:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 3 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 4 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 5 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 6 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 7 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 8 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 9 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Error : Web deployment task failed. (Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.) Publish failed to deploy.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 3 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 4 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 5 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 6 of 10. Updating file (xxxxxxxxxxxxx__staging\bin\EntityFramework.dll). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 7 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 8 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 9 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Warning : Retrying the sync because a socket error (10054) occurred.
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4295,5): Error : Web deployment task failed. (Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.) Publish failed to deploy.

我到处都在寻找解决方案.我尝试重新创建一个临时插槽.我曾尝试在网上搜索有关错误消息任何部分的任何参考;但没有可用的解决方案.

I have searched literally everywhere for a solution. I have tried re-creating a staging slot. I have tried searching on the web for any reference to any part of the error messages; but no solutions are available.

我正在使用Visual Studio 2015 Update3.这是一个.NET 4.5.1 Web应用程序.

I'm using Visual Studio 2015 Update 3. It's a .NET 4.5.1 web app.

在事件日志中,还有另一条错误消息: Error Code: 999 Exception Message: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. Exception Stack Trace: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers) --- End of inner exception stack trace ---
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.IO.BufferedStream.Flush() at System.IO.BufferedStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.BinaryWriter.Dispose(Boolean disposing) at System.IO.BinaryWriter.Close() at Microsoft.Web.Deployment.PackageSerializer.Dispose() at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable1 syncPass, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable1 syncPassId, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)

In the event log there is also another error message: Error Code: 999 Exception Message: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. Exception Stack Trace: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers) --- End of inner exception stack trace ---
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.IO.BufferedStream.Flush() at System.IO.BufferedStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.BinaryWriter.Dispose(Boolean disposing) at System.IO.BinaryWriter.Close() at Microsoft.Web.Deployment.PackageSerializer.Dispose() at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable1 syncPass, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable1 syncPassId, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)

但是,我相信上面是一个红色的鲱鱼;我想这是一个问题:

However, I believe the above is a red herring; I would imagine it's a problem with:

在对象sitemanifest(sourcePath)上重试操作'Serialization'.

Retrying operation 'Serialization' on object sitemanifest (sourcePath).

似乎此方法重试10次失败;这可能意味着打开的MSDeploy连接将关闭,从而导致第二次失败.

It appears this is retried 10 times with failure; this would probably mean the open MSDeploy connection would close, causing the second failure.

请注意,在发布向导中,我单击了验证连接"按钮,并显示了一个绿色的勾号

推荐答案

Microsoft几乎已确认这是一个错误.他们正在努力重现该问题.

Microsoft have pretty much confirmed it's a bug. They are struggling to reproduce the issue though.

解决方法是将名为WEBSITE_WEBDEPLOY_USE_SCM的新应用程序设置放入Azure门户上的Web应用程序,并将值设置为false.这样部署就可以了.

The workaround is to put a new app setting into the Web app on the Azure Portal, called WEBSITE_WEBDEPLOY_USE_SCM and set the value to false. Deployment then works fine.

这篇关于使用WebDeploy(MSDeploy)部署到Microsoft Azure网站目标不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆