2016-07-22 88 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