Debugging 调试Azure时的CommunicationObjectFaultedException
当尝试在一个功能完善的Azure项目上启动调试器时,什么会导致以下异常发生 System.ServiceModel.CommunicationObjectFaultedException was unhandled Message=未经处理的消息 通信对象, System.ServiceModel.Channel.ServiceChannel, 不能用于通信 因为它处于故障状态。Debugging 调试Azure时的CommunicationObjectFaultedException,debugging,azure,Debugging,Azure,当尝试在一个功能完善的Azure项目上启动调试器时,什么会导致以下异常发生 System.ServiceModel.CommunicationObjectFaultedException was unhandled Message=未经处理的消息 通信对象, System.ServiceModel.Channel.ServiceChannel, 不能用于通信 因为它处于故障状态。 Source=mscorlib StackTrace: 服务器堆栈跟踪: 在System.ServiceModel.
Source=mscorlib StackTrace: 服务器堆栈跟踪: 在System.ServiceModel.Channels.CommunicationObject.Close(时间跨度 超时) 在[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(字符串[]) args)InnerException:
对我来说,问题在于我的调试启动项目被设置为包项目(即包含服务定义文件的项目),而不是我的一个web角色。(这在我更换机器时被重置。)右键单击web角色并选择“设置为启动项目”修复了错误
如果您没有注意到上面的评论,@smarx还提到导致相同错误的常见原因是只读web.config文件,并指向。同一链接还提到了一些其他相关原因。常见原因是只读web.config。看见