我有一些設置&拆卸腳本,使用csrun.exe爲一些自動化測試準備本地計算模擬器。Azure計算仿真器錯誤「通信對象...不能用於通信,因爲它處於Faulted狀態。」
C:\Program Files\Microsoft SDKs\Azure\Emulator\csrun.exe /removeall C:\Program Files\Microsoft SDKs\Azure\Emulator\csrun.exe /devfabric:clean
C:\Program Files\Microsoft SDKs\Azure\Emulator\csrun.exe /run:"c:\myapp\csx\Release";"c:\myapp\bin\Release\app.publish\ServiceConfiguration.Local.cscfg"
的csrun調用不一致removeall過失敗,此錯誤:
Encountered an unexpected error The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. Server stack trace: at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.IDisposable.Dispose() at Microsoft.ServiceHosting.Tools.DevelopmentFabric.SingleInstanceFabricClient.Connect() at Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric.EnsureClient(Boolean checkConnection) at Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric.d__0.MoveNext() at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.RemoveAll() at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.ParseArguments(String[] args, Boolean doActions) at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.ExecuteActions(String[] args).
而且csrun呼籲部署也不一致失敗,出現同樣的錯誤(稍有不同的堆棧跟蹤):
Encountered an unexpected error The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. Server stack trace: at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.IDisposable.Dispose() at Microsoft.ServiceHosting.Tools.DevelopmentFabric.SingleInstanceFabricClient.RunServiceDeployment(String tenantName) at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Deployment.Start() at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.Run(DirectoryInfo dir, FileInfo serviceConfiguration, Boolean launchBrowser, Boolean paused, String debugger, Boolean useIISExpress, List`1 portOverrides) at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.ParseArguments(String[] args, Boolean doActions) at Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.ExecuteActions(String[] args).
這是Compute Emulator v2.4。
我已確認web.config是可寫且有效的。 (如this thread所示)
我在另一臺機器上進行了類似的設置,沒有問題。我知道的唯一區別是工作機器有單核CPU,而這個失敗的是雙核。
你解決了這個,因爲我剛剛開始出現此錯誤? – 2015-01-20 01:52:39
我剛開始也是這樣,可以通過刪除我的雲服務設置中的https端點來解決此問題。 我的月度天藍信用完了,我懷疑這跟它有關。 – Socardo 2015-01-20 02:41:21
通過將虛擬機移動到另一臺主機來解決這個問題 – Socardo 2015-01-21 04:03:28