Pet*_*ris 9 wcf distributed-transactions
我正在尝试运行将参与分布式事务的WCF Web服务.我一直收到以下错误消息......
找不到配置绑定扩展'system.serviceModel/bindings/myBinding'.验证此绑定扩展是否已在system.serviceModel/extensions/bindingExtensions中正确注册,并且拼写正确
这是web.config
<system.serviceModel>
<services>
<service name = "DistServiceX">
<endpoint
address=""
binding="myBinding"
contract="IDistService"
/>
</service>
</services>
<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" />
Run Code Online (Sandbox Code Playgroud)
有人能看出这有什么问题吗?这让我疯狂!
谢谢
皮特
mar*_*c_s 12
你在这里指的是自定义绑定:
<service name = "DistServiceX">
<endpoint
address=""
binding="myBinding"
contract="IDistService" />
Run Code Online (Sandbox Code Playgroud)
但是,myBinding在配置中的任何位置都没有调用自定义绑定.
我假设你真的想要引用你在配置文件中指定的a wsHttpBinding和myBinding绑定配置.此外:服务的名称必须与实现服务的类的完全限定名称相匹配 - 包括命名空间(以及:该服务实现并在给定端点上公开的合同的名称必须包含任何名称空间):
<service name="YourNamespace.DistServiceX">
<endpoint
address=""
binding="wsHttpBinding"
bindingConfiguration="myBinding"
contract="YourNamespace.IDistService" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28198 次 |
| 最近记录: |