Client端配置
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_CalculatorService" 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" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://it10:96/CalculatorService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_CalculatorService" contract="ServiceReference1.CalculatorService" name="WSHttpBinding_CalculatorService"> <identity> <servicePrincipalName value="host/it10" /> </identity> </endpoint> </client> </system.serviceModel> </configuration>
其它配置同
http://www.cnblogs.com/season2009/p/3454123.html
注意 : address中只能用机器名,不能用IP,否则监控不到