WCF 可靠会话(可靠消息传递)的问题 [英] Problems with WCF reliable session (reliable messaging)

查看:17
本文介绍了WCF 可靠会话(可靠消息传递)的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的 WCF 应用程序中,我试图配置可靠的会话.

In our WCF application I am trying to configure reliable sessions.

服务:

 <wsHttpBinding>
    <binding name="BindingStabiHTTP" maxBufferPoolSize="524288"
             maxReceivedMessageSize="2097152"
             messageEncoding="Text">
       <reliableSession enabled="true" ordered="true" 
                        inactivityTimeout="00:10:00"/>
          <readerQuotas maxDepth="0" maxStringContentLength="0" 
                        maxArrayLength="0" maxBytesPerRead="0"
                        maxNameTableCharCount="0" />
    </binding>
 </wsHttpBinding>

客户:

 <wsHttpBinding>
    <binding name="BindingClientWsHttpStandard" closeTimeout="00:01:00"
             openTimeout="00:01:00" receiveTimeout="00:10:00" 
             sendTimeout="00:01:00" bypassProxyOnLocal="false"
             transactionFlow="false" hostNameComparisonMode="StrongWildcard"
             maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
             messageEncoding="Text" textEncoding="utf-8" 
             useDefaultWebProxy="true" allowCookies="false">
       <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                     maxArrayLength="16384" maxBytesPerRead="4096"
                     maxNameTableCharCount="16384" />
       <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="true" />
       <security mode="Message">
          <transport clientCredentialType="Windows" proxyCredentialType="None"
                     realm="" />
          <message clientCredentialType="Windows" 
                   negotiateServiceCredential="true"
                   algorithmSuite="Default" establishSecurityContext="true" />
       </security>
    </binding>

不幸的是,我收到如下错误:没有为带有 'http://schemas.xmlsoap 的消息指定签名消息部分.org/ws/2005/02/rm/CreateSequence' 操作.

Unfortunately I get an error which is as follows: No signature message parts were specified for messages with the 'http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence' action.

如果我在客户端上禁用了reliableSession,我会收到以下消息:此端点不支持该操作.此端点仅处理 WS-ReliableMessaging 2005 年 2 月的消息.

If I disable the reliableSession on the client I get this message: The action is not supported by this endpoint. Only WS-ReliableMessaging February 2005 messages are processed by this endpoint.

所以看起来服务器是为 RM 正确配置的.

So it seems that the server is configured correctly for RM.

我找不到关于我得到的错误的任何有价值的信息,所以我不知道如何解决这个问题.有什么想法可能是错的吗?

I cannot find anything valuable about the error I get so I don't know how to fix this. Any ideas what can be wrong?

提前致谢,

罗布

推荐答案

在开始一个与 RM 配合良好的新测试项目后,我终于通过比较配置文件发现了问题.看来我们的服务配置没有指定正确的绑定配置:

After starting a new test project that worked fine with RM I finally found the problem by comparing the configuration files. It appeared that our service configuration did not specify the correct binding configuration:

<service behaviorConfiguration="somebehavior"
         name="somename">
   <endpoint address="" binding="wsHttpBinding" 
             bindingConfiguration="SomeBinding"
             name="http" 
             contract="somecontract" />
   <endpoint address="mex" 
             binding="mexHttpBinding" 
             bindingConfiguration=""
             name="mex" 
             contract="IMetadataExchange" />
   <host>
      <baseAddresses>
         <add baseAddress="http://localhost:8731/Design_Time_Addresses/somelibrary/someservice/" />
      </baseAddresses>
   </host>
</service>

此 bindingConfiguration 为空.然后它采用默认的 wsHttpBinding,它与指定的不同(即使只有 1 个).

This bindingConfiguration was empty. It then takes the default wsHttpBinding which is something different then the one specified (even if there is only 1).

这篇关于WCF 可靠会话(可靠消息传递)的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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