2016-07-22 78 views
1

我试图通过Visual Studio 2015的“发布”功能将我的Web应用程序部署到Azure网站/应用程序服务分段插槽,并且我收到以下错误:使用WebDeploy(MSDeploy)部署到Microsoft Azure网站目标不起作用

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.

我寻觅几乎无处不在的解决方案。我试过重新创建一个临时插槽。我曾尝试在网上搜索任何错误消息的任何部分;但没有可用的解决方案。

我正在使用Visual Studio 2015 Update 3,它是一个.NET 4.5.1网络应用程序。

在事件日志中也有另一种错误消息: 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)

然而,相信上述是一个红色的鲱鱼;我想这是一个问题:

在对象sitemanifest(sourcePath)上重试操作'序列化'。

看来这是重试10次失败;这可能意味着打开的MSDeploy连接将关闭,导致第二次失败。

请注意,发布向导中我点击“验证连接”按钮,它想出了一个绿色的勾

+0

恶意恶意软件干扰您的连接,通常是缩小包装的类型。没有任何东西可以被没有看到你的肩膀的人诊断出来。只是谷歌“天蓝色插座错误(10054)发生”的基本命中。 –

回答

2

微软几乎证实这是一个错误。尽管如此,他们正在努力重现这一问题。

解决方法是将新的应用程序设置放入Azure门户上的Web应用程序,名为WEBSITE_WEBDEPLOY_USE_SCM,并将值设置为false。然后部署工作正常。

+0

感谢@krisdyson为此,花了我一段时间来找到这篇文章。这样做后我还必须重新设置并重新下载我的发布配置文件(也是首先重新启动Web应用程序才能达到最佳效果),并且工作正常! – Ivan

0

我们有这个问题,部署到的预置型和后一台服务器是远远故障排除我们的网络团队发现了一个网络问题,它拦截了这些数据包并将其丢弃。我们通过使用WireShark监控网络流量来找到问题的发生地点/时间。网络团队进一步研究使用他们的工具来发现问题。对不起,我不知道他们真正改变了什么来解决这个问题。

您可以尝试从不同的网络(星巴克,家中,任何地方)部署来验证这是您的问题。

+0

我已经尝试了其他Internet连接。谢谢你 – krisdyson

-1

尝试了一个多星期后,今天工作。我身边没有任何变化,所以微软必须在Azure中解决一个问题。

+0

这个问题今天又回来了。 – krisdyson

+0

有没有到这个克里斯坦的底部? –

+1

@Fetchezlavache MS几乎证实这是一个错误。有一个解决方法,现在我将作为答案发布。 – krisdyson