首页 新闻 搜索 专区 学院

wcf问题 什么原因

0
[已解决问题] 解决于 2013-08-22 12:26

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ExposeMetaDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:9876/DeviceManagement/metadata" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <ws2007HttpBinding>
        <binding name="NewBinding0" />
      </ws2007HttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="ExposeMetaDataBehavior" name="DeviceManagementService.DeviceManageImplementation">

        <endpoint address="http://localhost:9876/DeviceManagementService"
            binding="ws2007HttpBinding" bindingConfiguration="NewBinding0"
            contract="DeviceManagementInterface.IDeviceManagement" />
      </service>
    </services>
  </system.serviceModel>
</configuration>


为什么会这样错
wcf
GhostRider_zkc的主页 GhostRider_zkc | 初学一级 | 园豆:18
提问于:2013-08-14 16:04
< >
分享
最佳答案
0

NewBinding0的定义在哪里?

奖励园豆:5
dudu | 高人七级 |园豆:35920 | 2013-08-14 16:45
其他回答(1)
0
没有地址是mex的 endpoint 
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ExposeMetaDataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:9876/DeviceManagement/metadata" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <ws2007HttpBinding>
        <binding name="NewBinding0" />
      </ws2007HttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="ExposeMetaDataBehavior" name="DeviceManagementService.DeviceManageImplementation">

        <endpoint address="http://localhost:9876/DeviceManagementService"
            binding="ws2007HttpBinding" bindingConfiguration="NewBinding0"
            contract="DeviceManagementInterface.IDeviceManagement" />
<endpoint address="http://localhost:9876/DeviceManagementService/mex" binding="ws2007HttpBinding" bindingConfiguration="NewBinding0" contract="DeviceManagementInterface.IDeviceManagement" />

</service> </services> </system.serviceModel> </configuration>


longxc | 园豆:205 (菜鸟二级) | 2013-08-14 18:20
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册