才开始学习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>
与道同样的问题 不知道楼主解决了吗?。/。。。。