首页 新闻 搜索 专区 学院

wcf 元数据

0
[已解决问题] 解决于 2013-08-14 15:57

配置文件

<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.

什么原因

wcf
GhostRider_zkc的主页 GhostRider_zkc | 初学一级 | 园豆:18
提问于:2013-08-12 15:13
< >
分享
最佳答案
0

<endpoint  中再添加一个 “元数据终结点”

奖励园豆:5
Launcher | 高人七级 |园豆:45045 | 2013-08-13 09:11
其他回答(1)
0

恭喜你,你的WCF已经运行,并且配置也是成功的。忽略这个提示,你现在可以在项目中添加web reference了

小AI | 园豆:354 (菜鸟二级) | 2013-08-12 15:17

是的,我的所有功能都正常,只是今天突然看元数据的时候发现这个问题,这是什么原因?

支持(0) 反对(0) GhostRider_zkc | 园豆:18 (初学一级) | 2013-08-12 15:19

@GhostRider_zkc: have any style information 。。这个应该没什么的。不要看到 does not就觉得是错误啊。。

支持(0) 反对(0) 小AI | 园豆:354 (菜鸟二级) | 2013-08-12 15:20

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.

支持(0) 反对(0) 小AI | 园豆:354 (菜鸟二级) | 2013-08-12 15:20
支持(0) 反对(0) 小AI | 园豆:354 (菜鸟二级) | 2013-08-12 15:20

@小AI: 感谢

支持(0) 反对(0) GhostRider_zkc | 园豆:18 (初学一级) | 2013-08-12 15:24

@GhostRider_zkc: 给个5分呗。。。。

支持(0) 反对(0) 小AI | 园豆:354 (菜鸟二级) | 2013-08-12 15:25
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册