【问题标题】:Exception: Content Type application/mspd1 was sent to a service expecting application/soap+msbin1例外:内容类型 application/mspd1 已发送到需要 application/soap+msbin1 的服务
【发布时间】:2012-03-04 21:11:17
【问题描述】:

我有 WCF 服务和 Silverlight 客户端。我使用 PollingDuplexElement。

在服务器端我有以下配置。

<binding name="DuplexmergencyRegistratorBinding">
   <binaryMessageEncoding/>
   <pollingDuplex maxPendingSessions="2147483647" maxPendingMessagesPerSession="2147483647" inactivityTimeout="02:00:00" serverPollTimeout="00:05:00"/>
   <httpTransport authenticationScheme="Negotiate"/>
 </binding>

在客户端:

<binding name="BasicHttpBinding_IEmergencyRegistrator">
  <binaryMessageEncoding/>
  <pollingDuplex duplexMode="MultipleMessagesPerPoll" inactivityTimeout="02:00:00" clientPollTimeout="00:05:00"/>      
  <httpTransport transferMode="StreamedResponse"/>
</binding>   

我收到以下错误: 内容类型 application/mspd1 已发送到需要 application/soap+msbin1 的服务。客户端和服务绑定可能不匹配。

还应该配置什么。 我花了很多时间,但找不到答案。

【问题讨论】:

    标签: wcf exception configuration pollingduplexhttpbinding


    【解决方案1】:

    最后我从代码中删除了客户端配置并配置了ServiceClient。

    【讨论】:

    • 发布确切的步骤和客户端配置会不会杀了你?
    • @BoppityBop 我无法再访问该代码了。很遗憾我没有附上工作示例和有关我的解决方案的更多详细信息。
    猜你喜欢
    • 2015-05-25
    • 1970-01-01
    • 1970-01-01
    • 2014-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-01
    相关资源
    最近更新 更多