WCF错误:用行动消息无法在接收处理 [英] WCF Error: The message with Action cannot be processed at the receiver

查看:640
本文介绍了WCF错误:用行动消息无法在接收处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了web应用程序,这是WCF客户端错误闻名:

I get famous error in web application, which is WCF client:

用行动消息不能
  在接收器进行处理,因
  ContractFilter的不匹配
  EndpointDispatcher。这可能是
  因为无论合同不匹配
  (发送者之间不匹配的行动和
  接收器)或绑定/安全
  发送器和之间的失配
  接收器。检查发件人和
  接收机具有相同的合同,
  相同的绑定(包括安全
  的要求,例如,信息,交通运输,
  无)。

The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

几个有趣的事实是:结果
- 它有时会发生,并为某些用户。这是一个从Web应用程序跟踪的一部分(用户1得到错误而user2的正常工作):

Several interesting facts are:
- it happens sometimes and for some users. It's a part of trace from web application (user1 gets errors whereas user2 works fine):

19/04/2011 9:43:37|52ms2ebf25dj1x2ldk0gci55/user1|OperationQueueTasksStart|TaskCount:1|InvestigationId:f855786f-f06c-4b63-bd38-e1f414c0270b
19/04/2011 9:43:38|52ms2ebf25dj1x2ldk0gci55/user1|OperationQueueTasksStop|Elapsed:0.0045741|WithResult:True|InvestigationId:f855786f-f06c-4b63-bd38-e1f414c0270b
19/04/2011 9:43:38|52ms2ebf25dj1x2ldk0gci55/user1|AllocationEnd|Elapsed:0.2748583
19/04/2011 9:43:38|52ms2ebf25dj1x2ldk0gci55/user1|AllocationErrorTrace|Errors were encountered:- The message with Action 'http://tempuri.org/IAllocationProvider/OperationQueueTasks2' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
19/04/2011 9:43:47|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:9.4693646|WithResult:False|InvestigationId:376f17e8-e969-4394-a6fc-2538632d2956
19/04/2011 9:43:47|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:5|InvestigationId:1083fe62-f31d-48b6-9f6b-d0a28a62912e
19/04/2011 9:43:53|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:6.0867429|WithResult:False|InvestigationId:1083fe62-f31d-48b6-9f6b-d0a28a62912e
19/04/2011 9:43:53|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:159ccda4-f753-40f0-a0a7-e531e6826d67
19/04/2011 9:43:57|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:3.9732669|WithResult:False|InvestigationId:159ccda4-f753-40f0-a0a7-e531e6826d67
19/04/2011 9:43:57|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:73493ade-c9cc-42e1-8be5-0869070c8542
19/04/2011 9:43:59|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.4491641|WithResult:False|InvestigationId:73493ade-c9cc-42e1-8be5-0869070c8542
19/04/2011 9:43:59|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:2|InvestigationId:60c0f224-558f-4f0b-977a-9c15e101a6a9
19/04/2011 9:44:03|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:3.1119381|WithResult:False|InvestigationId:60c0f224-558f-4f0b-977a-9c15e101a6a9
19/04/2011 9:44:03|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:2|InvestigationId:677fa342-ff38-49ae-bed1-3d2f8b843b17
19/04/2011 9:44:07|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:4.7489463|WithResult:False|InvestigationId:677fa342-ff38-49ae-bed1-3d2f8b843b17
19/04/2011 9:44:07|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:4|InvestigationId:c4cd34d6-3564-4a06-bc0b-f25fc37d86de
19/04/2011 9:44:12|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:4.41472|WithResult:False|InvestigationId:c4cd34d6-3564-4a06-bc0b-f25fc37d86de
19/04/2011 9:44:12|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:3|InvestigationId:b4e0a795-d4ba-42b8-8d21-3ffa2aa2a7fc
19/04/2011 9:44:16|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:4.0598829|WithResult:False|InvestigationId:b4e0a795-d4ba-42b8-8d21-3ffa2aa2a7fc
19/04/2011 9:44:16|o52wurr3kkx0pkj024dhjj55/user2|AllocationEnd|Elapsed:88.0465741
19/04/2011 9:44:47|52ms2ebf25dj1x2ldk0gci55/user1|AllocationStart|InvestigationCount:1|QueueId:98aebaa3-f507-4f3d-b919-1a95a5b1d2ea
19/04/2011 9:44:47|52ms2ebf25dj1x2ldk0gci55/user1|OperationQueueTasksStart|TaskCount:1|InvestigationId:f855786f-f06c-4b63-bd38-e1f414c0270b
19/04/2011 9:44:48|52ms2ebf25dj1x2ldk0gci55/user1|OperationQueueTasksStop|Elapsed:0.0043857|WithResult:True|InvestigationId:f855786f-f06c-4b63-bd38-e1f414c0270b
19/04/2011 9:44:48|52ms2ebf25dj1x2ldk0gci55/user1|AllocationEnd|Elapsed:0.3354014
19/04/2011 9:44:48|52ms2ebf25dj1x2ldk0gci55/user1|AllocationErrorTrace|Errors were encountered:- The message with Action 'http://tempuri.org/IAllocationProvider/OperationQueueTasks2' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
19/04/2011 9:51:27|o52wurr3kkx0pkj024dhjj55/user2|AllocationStart|InvestigationCount:14|QueueId:98aebaa3-f507-4f3d-b919-1a95a5b1d2ea
19/04/2011 9:51:27|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:a0c00957-c621-4f7a-a65d-1fa873b24afc
19/04/2011 9:51:29|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.6407058|WithResult:False|InvestigationId:a0c00957-c621-4f7a-a65d-1fa873b24afc
19/04/2011 9:51:29|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:29989dfb-1f4a-4524-ac50-68cce1b373b0
19/04/2011 9:51:32|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.3559612|WithResult:False|InvestigationId:29989dfb-1f4a-4524-ac50-68cce1b373b0
19/04/2011 9:51:32|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:f8978117-40b3-497e-baec-09ed0508e6d9
19/04/2011 9:51:34|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.736648|WithResult:False|InvestigationId:f8978117-40b3-497e-baec-09ed0508e6d9
19/04/2011 9:51:34|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:aea25d48-48eb-4bc8-9347-b7d79267330e
19/04/2011 9:51:37|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.3584367|WithResult:False|InvestigationId:aea25d48-48eb-4bc8-9347-b7d79267330e
19/04/2011 9:51:37|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:f983cc74-5e4e-438a-8083-dca3ab116d03
19/04/2011 9:51:39|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.3643481|WithResult:False|InvestigationId:f983cc74-5e4e-438a-8083-dca3ab116d03
19/04/2011 9:51:39|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:4fc1febb-3495-46bc-b3df-814c88e2164c
19/04/2011 9:51:41|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.4341061|WithResult:False|InvestigationId:4fc1febb-3495-46bc-b3df-814c88e2164c
19/04/2011 9:51:41|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:a7adf45e-2476-4478-b579-2eb58cb1b90e
19/04/2011 9:51:44|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.7966921|WithResult:False|InvestigationId:a7adf45e-2476-4478-b579-2eb58cb1b90e
19/04/2011 9:51:44|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:937ee46d-61ed-477f-91df-876dc011b488
19/04/2011 9:51:47|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.3558742|WithResult:False|InvestigationId:937ee46d-61ed-477f-91df-876dc011b488
19/04/2011 9:51:47|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:4f6c23d5-3082-4578-bc25-e1acaea3b944
19/04/2011 9:51:49|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.216947|WithResult:False|InvestigationId:4f6c23d5-3082-4578-bc25-e1acaea3b944
19/04/2011 9:51:49|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:e4c4517e-f522-490a-9e5d-4244cf51efe0
19/04/2011 9:51:51|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.5495532|WithResult:False|InvestigationId:e4c4517e-f522-490a-9e5d-4244cf51efe0
19/04/2011 9:51:51|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:8b7ecc3a-f234-45e7-8824-e39f0209d00b
19/04/2011 9:51:54|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.4506334|WithResult:False|InvestigationId:8b7ecc3a-f234-45e7-8824-e39f0209d00b
19/04/2011 9:51:54|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:abac0e79-587d-407d-bdb6-63c6af3f4217
19/04/2011 9:51:56|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.2250336|WithResult:False|InvestigationId:abac0e79-587d-407d-bdb6-63c6af3f4217
19/04/2011 9:51:56|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:0e11aea4-7cc8-4225-8ba1-c68487e38ad2
19/04/2011 9:52:00|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:3.9445225|WithResult:False|InvestigationId:0e11aea4-7cc8-4225-8ba1-c68487e38ad2
19/04/2011 9:52:00|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStart|TaskCount:1|InvestigationId:9c6557ed-843c-44d6-a6b0-bd2a702efcaf
19/04/2011 9:52:03|o52wurr3kkx0pkj024dhjj55/user2|OperationQueueTasksStop|Elapsed:2.6812607|WithResult:False|InvestigationId:9c6557ed-843c-44d6-a6b0-bd2a702efcaf
19/04/2011 9:52:03|o52wurr3kkx0pkj024dhjj55/user2|AllocationEnd|Elapsed:36.1138801


  • 也有一个图案(我不知道如何可靠的)一些特定的用户(在ASP.NET的会话方面)得到这个错误更频繁(如果不是全部的时间)疗法等。在另一方面,我有没有经历过那个错误的所有用户。

  • 任何想法可能会导致神秘的行为?

    Any ideas what can cause that mysterious behaviour?

    谢谢你,帕维尔

    编辑1:添加配置信息

    <endpoint address="net.tcp://10.80.12.25:8400/Hire.Application.Services/AllocationService" behaviorConfiguration="endpointBehavior" binding="netTcpBinding" bindingConfiguration="netTcpBinding" contract="Hire.Application.Contracts.IAllocationProvider" name="AllocationProvider" />
    
    <endpointBehaviors>
        <behavior name="endpointBehavior">
            <customBehavior />
        </behavior>
    </endpointBehaviors>
    
    <extensions>
        <behaviorExtensions>
            <add name="customBehavior" type="Hire.Application.Contracts.CustomBehaviorExtensionElement, Hire.Application.Contracts, Version=5.2.7.0, Culture=neutral, PublicKeyToken=null" />
        </behaviorExtensions>
    </extensions>
    
    <bindings>
        <netTcpBinding>
            <binding name="netTcpBinding" closeTimeout="00:05:00" openTimeout="00:05:00" sendTimeout="00:05:00" receiveTimeout="00:15:00" hostNameComparisonMode="StrongWildcard" maxBufferSize="6553600" maxBufferPoolSize="524288" maxReceivedMessageSize="6553600">
                <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None" />
            </binding>
        </netTcpBinding>
    </bindings>
    

    编辑2:。NetTcpBinding的使用默认配置(会话启动,无SessionMode属性上设置的服务还会话超时使用默认值也InstanceContextMode设置为默认值PerSession

    EDIT 2: netTcpBinding uses default configuration (sessions are enabled, no SessionMode properties are set on service. Also session timeouts use default values. Also InstanceContextMode is set to default PerSession value.

    推荐答案

    问题解决了。原来,Web服务器(WCF客户端)与四分之一的应用服务器(节点)使用某物像循环连接,使得请求时。出于某种原因,有一个节点有老的服务合同组装与旧经营合同旧方法签名(谢谢反射!)。

    issue resolved. It turned out that web server (WCF Client) was connecting with one out of four application servers (nodes) using sth like round-robin, when making requests. One node for some reason had old service contract assembly with old operation contract and old method signature (thank you Reflector!).

    谢谢你,帕维尔

    这篇关于WCF错误:用行动消息无法在接收处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆