<?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>
为什么会这样错
NewBinding0的定义在哪里?
没有地址是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>