简体   繁体   English

找不到配置绑定扩展名'system.serviceModel / bindings / pollingDuplexHttpBinding'

[英]Configuration binding extension 'system.serviceModel/bindings/pollingDuplexHttpBinding' could not be found

Problem 问题

I'm getting the following error whenever I try to load out .svc url (Local) 每当我尝试加载.svc url(本地)时,都会出现以下错误

Configuration binding extension 'system.serviceModel/bindings/pollingDuplexHttpBinding' could not be found. 找不到配置绑定扩展名“ system.serviceModel / bindings / pollingDuplexHttpBinding”。 Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly. 验证此绑定扩展名已在system.serviceModel / extensions / bindingExtensions中正确注册,并且拼写正确。

Enviroment 环保环境

The project was build by a ex colleague of mine, who I can't reach. 该项目是由我的一位前同事建立的,我无法联系到。 It's a webservice build in .Net Framework 4 这是.Net Framework 4中的Web服务版本

I get this error when I attempt to gain access to our .svc file 当我尝试访问我们的.svc文件时出现此错误

In the web.config I have this setting: 在web.config中,我有以下设置:

<system.serviceModel>
  <extensions>
    <bindingExtensions>
      <add name="pollingDuplexHttpBinding" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement, System.ServiceModel.PollingDuplex, version=3.0.0.0, Culture=neutral" />
    </bindingExtensions>
  </extensions>

which is later used as <endpoint address="" binding="pollingDuplexHttpBinding" contract="<ourcompany>.DataService.IMessageService"/> 后来用作<endpoint address="" binding="pollingDuplexHttpBinding" contract="<ourcompany>.DataService.IMessageService"/>

Attempts 尝试次数

In regards to other posts about this error I have already tried: 关于其他有关此错误的帖子,我已经尝试过:

Installing Dot net 3.5 SP1 安装Dot net 3.5 SP1

Removing the line from web.config 从web.config删除行

Reinstalled IIS 重新安装IIS

I have no idea what to do, or how to fix this. 我不知道该怎么办,或如何解决此问题。

The strange part is that it does work on our live server, but not on my own computer for testing purposes! 奇怪的是它可以在我们的实时服务器上运行,但不能在我自己的计算机上进行测试!

Refer - Unrecognized element 'pollingDuplexHttpBinding' in service reference configuration 参考- 服务参考配置中无法识别的元素'pollingDuplexHttpBinding'

<!-- Register the binding extension from the SDK. -->
<extensions>
  <bindingExtensions>
    <add name=
        "pollingDuplexHttpBinding"
        type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </bindingExtensions>

The difference here is, Version=4.0.0.0 and PublicKeyToken=31bf3856ad364e35 . 此处的区别是Version=4.0.0.0PublicKeyToken=31bf3856ad364e35

You can get more information on the Section "To use PollingDuplexHttpBinding" section of - How to: Build a Duplex Service for a Silverlight Client . 您可以在- 如何:为Silverlight客户端构建双工服务的 “使用PollingDuplexHttpBinding”部分中获得更多信息。

Good luck. 祝好运。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM