配置文件
<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>
在浏览器输入地址后,出现错误。
This XML file does not appear to have any style information associated with it. The document tree is shown below.
什么原因
<endpoint 中再添加一个 “元数据终结点”
恭喜你,你的WCF已经运行,并且配置也是成功的。忽略这个提示,你现在可以在项目中添加web reference了
是的,我的所有功能都正常,只是今天突然看元数据的时候发现这个问题,这是什么原因?
@GhostRider_zkc: have any style information 。。这个应该没什么的。不要看到 does not就觉得是错误啊。。
The message isn't an "error" but rather a warning. An XML document is a data structure but does not contain any presentation/style information internally. Normally an XML document is used in inter-application communication or as a pure data structure that is then used with additional presentation/style information to display to users.
What you really see is that Firefox is warning you while Internet Explorer defaults to a tree like view. You can still view the data and just disregard the warning.
@GhostRider_zkc:
@小AI: 感谢
@GhostRider_zkc: 给个5分呗。。。。