我有一个在本地计算机上测试过的WCF服务。 现在,客户端不会调用远程计算机上的已安装服务。 我检查了 netstat ,客户已连接到服务( ESTABLISHED ),但客户端尚未调用WCF方法。
问题出在哪里? 服务器:
<system.serviceModel>
<services>
<service name="EH.Service.CAgentManager_MainService">
<endpoint address="" binding="wsDualHttpBinding" contract="EH.Service.IAgentManager_MainService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://10.10.10.53:8732/Design_Time_Addresses/EH.Service/AgentManager_MainService/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
客户端:
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IAgentManager_MainService" closeTimeout="00:00:05"
openTimeout="00:00:05" receiveTimeout="00:00:10" sendTimeout="00:00:10"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="52428800" maxReceivedMessageSize="6553600"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192000" maxArrayLength="16384000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:01:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://10.10.10.53:8732/Design_Time_Addresses/EH.Service/AgentManager_MainService/"
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IAgentManager_MainService"
contract="AgentManagerServiceReference.IAgentManager_MainService"
name="WSDualHttpBinding_IAgentManager_MainService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>