【发布时间】:2011-08-09 18:34:45
【问题描述】:
刚刚迁移,现在我收到以下错误消息...
由于 EndpointDispatcher 的 ContractFilter 不匹配,接收方无法处理带有 Action 'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT' 的消息。这可能是因为合约不匹配(发送方和接收方之间的操作不匹配)或发送方和接收方之间的绑定/安全不匹配。检查发送方和接收方是否具有相同的合同和相同的绑定(包括安全要求,例如消息、传输、无)。
与 3.5 版本相比,没有什么其他变化,它工作正常。我正在使用 SSL、TransportWithMessageCredential 和客户端 Credentials = "UserName"
服务器端配置如下:
<system.serviceModel>
<services>
<service name="BPA.SCA.CFI.CFIWcfService"
behaviorConfiguration="defaultSecure">
<host>
<baseAddresses>
<add baseAddress="https://rdSlice.dev.local/SCACFI/"/>
<!-- <add baseAddress="https://rdSlice.dev.local/SCACFI/"/> -->
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="wsHttpBinding"
bindingNamespace="https://rdSlice.bpa.gov"
bindingConfiguration="SecureTransport"
contract="BPA.SCA.CFIService.IManageSCACFI" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="defaultSecure">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="True"/>
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
<serviceCredentials>
<userNameAuthentication
userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="SCASqlMembershipProvider" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="SecureTransport"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message establishSecurityContext="false"
clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
【问题讨论】:
标签: wcf