好的,所以我有
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="ExternalMonitoringBinding"
clientBaseAddress="http://localhost:50000/"
closeTimeout="00:00:30">
<security mode ="None"/>
<reliableSession ordered="false"/>
</binding>
</wsDualHttpBinding>
</bindings>
<services>
<service name="Loop.Nextmove.ExternalMonitoring.NextmoveMonitorService">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="ExternalMonitoringBinding"
contract="Loop.Nextmove.ExternalMonitoring.INextmoveCommunicatorMonitorService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/NextmoveComunicatorHelpdesk/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>`
每当我发现该服务时,客户端都会得到以下信息:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_INextmoveCommunicatorMonitorService"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="None">
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8732/Design_Time_Addresses/NextmoveComunicatorHelpdesk/Service1/"
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_INextmoveCommunicatorMonitorService"
contract="NextmoveMonitoring.INextmoveCommunicatorMonitorService"
name="WSDualHttpBinding_INextmoveCommunicatorMonitorService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>`
如您所见,它似乎完全忽略了命名绑定及其值clientBaseAddress
和closeTimeout
值。但是,它显然做对了,因为安全模式被正确设置为无。
我在这里做错了什么?