首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WCF可靠会话问题(可靠消息传递)

WCF可靠会话问题(可靠消息传递)
EN

Stack Overflow用户
提问于 2010-05-26 21:57:05
回答 2查看 12.2K关注 0票数 4

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

服务:

代码语言:javascript
复制
 <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>

客户端:

代码语言:javascript
复制
 <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‘操作的消息指定签名消息部分。

如果我在客户机上禁用reliableSession,我会收到这样的消息:此端点不支持该操作。此终结点仅处理WS-ReliableMessaging 2005年2月的消息。

因此,似乎已为RM正确配置了服务器。

我找不到关于我得到的错误的任何有价值的东西,所以我不知道如何修复它。有什么想法可能是错的吗?

提前感谢,

抢夺

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-05-27 16:20:11

在启动一个与RM配合良好的新测试项目后,我通过比较配置文件最终发现了问题所在。我们的服务配置似乎没有指定正确的绑定配置:

代码语言:javascript
复制
<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)。

票数 3
EN

Stack Overflow用户

发布于 2010-05-26 22:01:11

我认为客户端和服务器的安全设置不匹配。

客户端具有:

代码语言:javascript
复制
<security mode="Message">
   <transport clientCredentialType="Windows" 
               proxyCredentialType="None" realm="" />
   <message clientCredentialType="Windows" negotiateServiceCredential="true"
             algorithmSuite="Default" establishSecurityContext="true" />
</security>

而服务器什么都没有……

您可以尝试在客户端和服务器上使用相同的设置吗?那么它能工作吗??

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2913596

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档