在我们的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‘操作的消息指定签名消息部分。
如果我在客户机上禁用reliableSession,我会收到这样的消息:此端点不支持该操作。此终结点仅处理WS-ReliableMessaging 2005年2月的消息。
因此,似乎已为RM正确配置了服务器。
我找不到关于我得到的错误的任何有价值的东西,所以我不知道如何修复它。有什么想法可能是错的吗?
提前感谢,
抢夺
发布于 2010-05-27 16:20:11
在启动一个与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>此bindingConfiguration为空。然后,它采用默认的wsHttpBinding,该值与指定的值不同(即使只有1)。
发布于 2010-05-26 22:01:11
我认为客户端和服务器的安全设置不匹配。
客户端具有:
<security mode="Message">
<transport clientCredentialType="Windows"
proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>而服务器什么都没有……
您可以尝试在客户端和服务器上使用相同的设置吗?那么它能工作吗??
https://stackoverflow.com/questions/2913596
复制相似问题