IIS部署net.tcp问题,详细请点进来,谢谢

bustersword 2013-04-26 10:07:46
我在iis上部署了一个服务,是net.tcp方式的
服务已经可以访问了


但是我客户端调用却总是报错,我不知道我的客户端配置是否正确,我已经试了很多配置形式,都是不行,
现在的报错是
没有终结点在侦听可以接受消息的 net.tcp://192.168.137.173/NotifyService.svc。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参见 InnerException 以了解详细信息。

我的客户端配置是,问题应该是出现在这里,请知道的大大们告知下,怎么解决,谢谢
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<client>
<endpoint address="net.tcp://192.168.137.173/NotifyService.svc"
binding="netTcpBinding" bindingConfiguration="DuplexBinding"
contract="INotifyBoard" name="" />
</client>
<bindings>
<netTcpBinding>
<binding name="DuplexBinding" sendTimeout="00:00:20">
<reliableSession enabled="true" />
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>


服务端的配置是
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="tcpBinding" portSharingEnabled="true"/>
<binding name="mexTcp" portSharingEnabled="true">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="tcpB">
<serviceThrottling />
<serviceMetadata httpGetEnabled="true" />

</behavior>
</serviceBehaviors>
</behaviors>

<services>
<service behaviorConfiguration="tcpB" name="NotifyService.NotifyService">
<host>
<baseAddresses>
<add baseAddress="http://192.168.104.46:1111/NotifyService.svc"/>
</baseAddresses>
</host>
<endpoint address="net.tcp://192.168.104.46/NotifyService.svc"
binding="netTcpBinding" bindingConfiguration="tcpBinding" name="duplexService"
contract="NotifyService.INotifyBoard" />
<endpoint address="mex" binding="netTcpBinding" contract="IMetadataExchange"
bindingConfiguration="mexTcp" />
</service>
</services>

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
若要在调试过程中浏览 Web 应用程序根目录,请将下面的值设置为 True。
在部署之前将该值设置为 False 可避免泄露 Web 应用程序文件夹信息。
-->
<directoryBrowse enabled="true"/>
</system.webServer>

</configuration>
...全文
292 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
bustersword 2014-01-03
  • 打赏
  • 举报
回复
引用 4 楼 huohuangfengcheng 的回复:
哥们 你的问题解决了吗?
早解决了,哥都写了一整个silverlight框架了 ,回头看,都是淡淡的忧桑啊
  • 打赏
  • 举报
回复
哥们 你的问题解决了吗?
bustersword 2013-10-25
  • 打赏
  • 举报
回复
送分都没人要,可见分不值钱啊
feiyun0112 2013-10-23
  • 打赏
  • 举报
回复
<add baseAddress="http://192.168.104.46:1111/NotifyService.svc"/>

*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
bustersword 2013-10-23
  • 打赏
  • 举报
回复
来人送分了,快快

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧