首页 新闻 赞助 找找看

WCF多服务配置失败

0
悬赏园豆:30 [已关闭问题]

首先来看一下项目结构

如图中所示,我需要在App.config文件中配置两个服务:IBookSerivices和IWcfSvrCallBack

配置的结果如下面的XML

代码
<services>
<service behaviorConfiguration="services_first.Service1Behavior"
name
="services_first.BookServices">
<endpoint address="" binding="wsHttpBinding" contract="services_first.IBookservices">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/services_first/Service1/" />
</baseAddresses>
</host>
</service>


<service behaviorConfiguration="services_first.Service1Behavior"
name
="services_first.WCFSvrCallBack">
<endpoint binding="wsHttpBinding" bindingConfiguration="" contract="services_first.IWCFSvrCallUser" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/services_first/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
我在谳试启动新实例时出现以下错误:

System.InvalidOperationException: 协定需要双工,但是绑定“WSHttpBinding”不支持它或者因配置不正确而无法支持它。

 

是哪儿配置错了呢?请指点,谢谢啊!

问题补充: 源代码我放在了以下的下载地址上: http://files.cnblogs.com/denni/services_first.rar
denli的主页 denli | 初学一级 | 园豆:17
提问于:2010-03-22 14:32
< >
分享
其他回答(1)
0

将配置: <endpoint address="" binding="wsHttpBinding" contract="WcfServiceLibrary1.IService1"> 
                    <identity> 
                        <dns value="localhost" /> 
                    </identity> 
                </endpoint> 
中的wsHttpBinding改成wsDualHttpBinding。

试试

齐.net | 园豆:1421 (小虾三级) | 2010-03-22 14:50
我下载不了……
支持(0) 反对(0) 齐.net | 园豆:1421 (小虾三级) | 2010-03-22 17:54
感谢齐.net,此问题偶还没有搞定呢。
支持(0) 反对(0) denli | 园豆:17 (初学一级) | 2010-03-24 11:10
0

遇到同样的问题,LZ这个问题解决没有!

LLKey221 | 园豆:172 (初学一级) | 2013-05-08 15:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册