首页 新闻 会员 周边 捐助

使用svcutil生成代理类遇到“元数据包含无法解析的引用”

0
[待解决问题]

才开始学习WCF,遇到了些问题,望大哥们能指点下,谢谢

 

命令: svcutil  net.tcp://127.0.0.1:22222/chatservice /out:Proxy.cs

错误提示:
Attempting to download metadata from 'net.tcp://127.0.0.1:22222/chatservice' usi
ng WS-Metadata Exchange. This URL does not support DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from net.tcp://127.0.0.1:22222/chatservice

If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess.  For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
    URI: net.tcp://127.0.0.1:22222/chatservice

    元数据包含无法解析的引用:“net.tcp://127.0.0.1:22222/chatservice”。

    <?xml version="1.0" encoding="utf-16"?><Fault xmlns="http://www.w3.org/2003/
05/soap-envelope"><Code><Value>Sender</Value><Subcode><Value xmlns:a="http://www
.w3.org/2005/08/addressing">a:ActionNotSupported</Value></Subcode></Code><Reason
><Text xml:lang="zh-CN">此终结点不支持操作 http://schemas.xmlsoap.org/ws/2004/09
/transfer/Get。此终结点仅处理 WS-ReliableMessaging 2005 年 2 月的消息。</Text></
Reason></Fault>

这是配置文件:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="addr" value="net.tcp://127.0.0.1:22222/chatservice" />
</appSettings>
<system.serviceModel>
<services>
<service name="ChatService.ChatService" behaviorConfiguration="MyBehavior">
<endpoint address=""
binding
="netTcpBinding"
bindingConfiguration
="DuplexBinding"
contract
="ChatContract.IContract" />
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name="MyBehavior">
<serviceThrottling maxConcurrentSessions="10000" />
</behavior>
</serviceBehaviors>
</behaviors>

<bindings>
<netTcpBinding>
<binding name="DuplexBinding" sendTimeout="00:00:01">
<reliableSession enabled="true" />
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
kK_wen的主页 kK_wen | 初学一级 | 园豆:198
提问于:2011-03-03 12:42
< >
分享
所有回答(2)
0

与道同样的问题 不知道楼主解决了吗?。/。。。。

jiangzhuo | 园豆:205 (菜鸟二级) | 2012-02-02 18:01
0
飞蛾扑火 | 园豆:145 (初学一级) | 2012-03-08 13:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册