windows通信基础(客户端配置文件)
WCF的客户端配置文件:
1<?xml version="1.0" encoding="utf-8"?>
2<configuration>
3 <system.serviceModel>
4 <bindings>
5 <wsHttpBinding>
6 <binding name="WSHttpBinding_IUserInfo" closeTimeout="00:01:00"
7 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
8 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
9 maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
10 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
11 allowCookies="false">
12 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
13 maxBytesPerRead="4096" maxNameTableCharCount="16384" />
14 <reliableSession ordered="true" inactivityTimeout="00:10:00"
15 enabled="false" />
16 <security mode="Message">
17 <transport clientCredentialType="Windows" proxyCredentialType="None"
18 realm="" />
19 <message clientCredentialType="Windows" negotiateServiceCredential="true"
20 algorithmSuite="Default" establishSecurityContext="true" />
21 </security>
22 </binding>
23 </wsHttpBinding>
24 </bindings>
25 <client>
26 <endpoint address="http://localhost:8080/WCFDemo/Services" binding="wsHttpBinding"
27 bindingConfiguration="WSHttpBinding_IUserInfo" contract="IUserInfo"
28 name="WSHttpBinding_IUserInfo">
29 </endpoint>
30 </client>
31 </system.serviceModel>
32</configuration>
2<configuration>
3 <system.serviceModel>
4 <bindings>
5 <wsHttpBinding>
6 <binding name="WSHttpBinding_IUserInfo" closeTimeout="00:01:00"
7 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
8 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
9 maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
10 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
11 allowCookies="false">
12 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
13 maxBytesPerRead="4096" maxNameTableCharCount="16384" />
14 <reliableSession ordered="true" inactivityTimeout="00:10:00"
15 enabled="false" />
16 <security mode="Message">
17 <transport clientCredentialType="Windows" proxyCredentialType="None"
18 realm="" />
19 <message clientCredentialType="Windows" negotiateServiceCredential="true"
20 algorithmSuite="Default" establishSecurityContext="true" />
21 </security>
22 </binding>
23 </wsHttpBinding>
24 </bindings>
25 <client>
26 <endpoint address="http://localhost:8080/WCFDemo/Services" binding="wsHttpBinding"
27 bindingConfiguration="WSHttpBinding_IUserInfo" contract="IUserInfo"
28 name="WSHttpBinding_IUserInfo">
29 </endpoint>
30 </client>
31 </system.serviceModel>
32</configuration>