在 Visual Studio 中运行 WCF 服务,我在 Debug 输出中看到大量异常。
A first chance exception of type 'System.ServiceModel.FaultException' occurred in System.ServiceModel.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.ServiceModel.Channels.dll
它们似乎被不规则地抛出:在任何情况下,我都无法找出任何模式(即从每隔几秒到几十秒的任何地方)。
如果我将调试设置为中断FaultException
,我会看到它们被System.ServiceModel.Dispatcher.ErrorBehavior.ThrowAndCatch(Exception e, Message message)
.
异常消息是{"The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree."}
。
显而易见的答案似乎是“你的地址是空的”。但这发生在任何客户端连接之前。
这只是“正常”,还是我做错了什么的症状?