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

发布于 2024-09-02 21:27:08 字数 2228 浏览 12 评论 0原文

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

服务:

 <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' 操作。

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

所以看来服务器的 RM 配置是正确的。

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

预先感谢,

罗布

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

Service:

 <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>

Client:

 <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>

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.

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.

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?

Thank in advance,

Rob

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷情妓 2024-09-09 21:27:08

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

<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>

此绑定配置为空。然后,它采用默认的 wsHttpBinding,该值与指定的不同(即使只有 1 个)。

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>

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

我要还你自由 2024-09-09 21:27:08

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

客户端有:

<security mode="Message">
   <transport clientCredentialType="Windows" 
               proxyCredentialType="None" realm="" />
   <message clientCredentialType="Windows" negotiateServiceCredential="true"
             algorithmSuite="Default" establishSecurityContext="true" />
</security>

而服务器端什么都没有......

你能尝试让客户端和服务器有相同的设置吗?那还用得着吗??

I think the security settings for client and server don't match.

The client has:

<security mode="Message">
   <transport clientCredentialType="Windows" 
               proxyCredentialType="None" realm="" />
   <message clientCredentialType="Windows" negotiateServiceCredential="true"
             algorithmSuite="Default" establishSecurityContext="true" />
</security>

and the server has nothing at all.....

Can you try to have the same settings for both client and server? Does it work then??

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文