开发者

Configuration binding extension could not be found

开发者 https://www.devze.com 2023-01-20 10:19 出处:网络
I am trying to get a WCF webservice running which will participate in distributed transactions.I keep getting the following error message...

I am trying to get a WCF webservice running which will participate in distributed transactions. I keep getting the following error message...

Configuration binding extension 'system.serviceModel/bindings/myBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly

Here is the web.config

  <system.serviceModel>
<services>
  <service name = "DistServiceX">
    <endpoint
       address=""
       binding="myBinding"
       contract="IDistService"
     />
  </service>
</services>
开发者_Go百科<bindings>
  <wsHttpBinding>
    <binding
      name="myBinding" 
      transactionFlow="true"
      />
  </wsHttpBinding>
</bindings>

<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Can anyone see what is wrong with this? It's driving me crazy!

Thanks

Pete


You are referring to a custom binding here:

<service name = "DistServiceX">
   <endpoint
       address=""
       binding="myBinding"
      contract="IDistService" />

However, there is no custom binding called myBinding anywhere in your config.

I assume you really want to refer to a wsHttpBinding and the myBinding binding configuration that you specified in your config file. Furthermore: the name of the service must match the fully qualified name of the class that implements the service - including namespace (and also: the name of the contract being implemented by that service and exposed on a given endpoint must include any namespaces):

<service name="YourNamespace.DistServiceX">
   <endpoint
       address=""
       binding="wsHttpBinding" 
       bindingConfiguration="myBinding"
       contract="YourNamespace.IDistService" />
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号