调试Azure时CommunicationObjectFaultedException

时间:2011-02-04 15:02:02

标签: debugging azure

尝试在功能完善的Azure项目上启动调试器时,会导致以下异常的原因是什么?

  

System.ServiceModel.CommunicationObjectFaultedException   未处理的消息=   沟通对象,   System.ServiceModel.Channels.ServiceChannel,   不能用于沟通   因为它处于Faulted状态。
  Source = mscorlib StackTrace:       服务器堆栈跟踪:          在System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan   超时)       在[0]处重新抛出异常:          在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage   reqMsg,IMessage retMsg)          在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&   msgData,Int32类型)          在System.ServiceModel.ICommunicationObject.Close(TimeSpan   超时)          在System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Close(TimeSpan)   超时)          在Microsoft.WindowsAzure.Hosts.WaIISHost.Program.Main(String []   args)InnerException:

1 个答案:

答案 0 :(得分:0)

对我来说,问题是我的调试启动项目设置为包项目(即包含服务定义文件的项目)而不是我的一个Web角色。 (当我更换机器时,这会被重置。)右键单击Web角色并选择“设置为启动项目”修复了错误。

如果你没有注意到上面的评论,@ smarx还提到同一错误的常见原因是只读的web.config文件并指向http://msdn.microsoft.com/en-us/library/gg494981.aspx。同样的链接也提到了其他几个相关的原因。