【发布时间】:2009-09-10 08:40:51
【问题描述】:
这是托管服务时的配置文件,这里我使用 ip 127.0.0.1:36345 托管服务,这里使用 netTcpBinding 无法访问服务 当我使用服务器的确切 ip (192.168.1.47:36345) 托管它时,它可以工作..
可能的原因和解决方案是什么?
<services>
<service behaviorConfiguration="metadataSupport" name="WCFSvc.WCFService">
<endpoint binding="wsDualHttpBinding" bindingConfiguration="wsDualHttp"
contract="WCFSvc.IWCFService" />
<endpoint binding="netTcpBinding" bindingConfiguration="netTcp"
contract="WCFSvc.IWCFService" />
<endpoint binding="netNamedPipeBinding" contract="WCFSvc.IWCFService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://127.0.0.1:26345/WCFSvc" />
<add baseAddress="net.tcp://127.0.0.1:36345/WCFSvc" />
<add baseAddress="net.pipe://localhost/DataService/Service.svc" />
</baseAddresses>
</host>
</service>
</services>
【问题讨论】:
-
您如何托管您的服务?在 IIS 7 中?你有自己的托管应用吗??
-
我在托管的 Windows 服务中托管
标签: c# .net wcf wcf-binding