<?xml version="1.0" encoding="utf-8"?>
|
<configuration>
|
<startup>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
</startup>
|
<appSettings>
|
<!--【此配置已取消】:是否使用HTTPS协议 true/false -->
|
<!-- WCFFactory.Create<T>方法使用:-->
|
<!-- 1.若WCF服务器基于https协议,必须设置为:true -->
|
<!-- 2.开发环境(本地测试)设置为:false -->
|
<add key="UseHttps" value="false"/>
|
<!--支持3种凭据类型:Basic/Windows/Certificate-->
|
<!--默认安全模式为Message,凭据类型:Windows-->
|
<add key="UseCredentials" value="Windows"/>
|
<!--SSL证书密码-->
|
<add key="SSLPassword" value="V6gTKX+nZUB+5imSHNpMTg=="/>
|
<!--Basic/Windows凭据账号和密码,请使用KeyProvider.Default.Decrypt解密-->
|
<add key="Windows_UserName" value="HS+AHKm26rokVfWqabT5TA=="/>
|
<add key="Windows_Password" value="Snj6+Q3dGGb1ukbEi0igFw=="/>
|
<!--开发环境(本地测试):IIS承载的WCF服务地址(HTTP)协议,支持:wsHttpBinding/basicHttpBinding两种协议-->
|
<add key="ICommonService"
|
value="http://localhost:32641/CommonService.svc"/>
|
<add key="IDataDictService"
|
value="http://localhost:32641/DataDictService.svc"/>
|
<add key="IMessageCenter"
|
value="http://localhost:32641/MessageCenter.svc"/>
|
<add key="ISystemSecurityService"
|
value="http://localhost:32641/SystemSecurityService.svc"/>
|
<!--正式环境(发布部署):IIS承载的WCF服务地址(HTTPS)协议,CSFramework阿里云测试服务器-->
|
<!--
|
<add key="ICommonService" value="https://cs5.manonwo.com/CommonService.svc"/>
|
<add key="IDataDictService" value="https://cs5.manonwo.com/DataDictService.svc"/>
|
<add key="IMessageCenter" value="https://cs5.manonwo.com/MessageCenter.svc"/>
|
<add key="ISystemSecurityService" value="https://cs5.manonwo.com/SystemSecurityService.svc"/>
|
-->
|
</appSettings>
|
<!--WCF服务客户端配置-->
|
<system.serviceModel>
|
<bindings>
|
<wsHttpBinding>
|
<binding name="WSHttpBinding" closeTimeout="00:10:00"
|
openTimeout="00:10:00" receiveTimeout="00:10:00"
|
sendTimeout="00:10:00" bypassProxyOnLocal="false"
|
transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="2147483647"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="2147483647"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="2147483647"
|
maxNameTableCharCount="2147483647"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="false"/>
|
<security mode="Message">
|
<transport clientCredentialType="Windows"
|
proxyCredentialType="None"/>
|
<!--若安全模式=Message,negotiateServiceCredential必须设置true-->
|
<message clientCredentialType="Windows"
|
negotiateServiceCredential="true"
|
establishSecurityContext="false"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_ICommonService"
|
closeTimeout="00:01:00" openTimeout="00:00:30"
|
receiveTimeout="04:00:00" sendTimeout="00:00:10"
|
bypassProxyOnLocal="false" transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="524288"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="6553600"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="6553600"
|
maxNameTableCharCount="6553600"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="true"/>
|
<security mode="Message">
|
<transport realm=""/>
|
<message algorithmSuite="Default"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_IDataDictService"
|
closeTimeout="00:01:00" openTimeout="00:00:30"
|
receiveTimeout="04:00:00" sendTimeout="00:00:10"
|
bypassProxyOnLocal="false" transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="524288"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="6553600"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="6553600"
|
maxNameTableCharCount="6553600"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="true"/>
|
<security mode="Message">
|
<transport realm=""/>
|
<message algorithmSuite="Default"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_ISystemSecurityService"
|
closeTimeout="00:01:00" openTimeout="00:00:30"
|
receiveTimeout="04:00:00" sendTimeout="00:00:10"
|
bypassProxyOnLocal="false" transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="524288"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="6553600"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="6553600"
|
maxNameTableCharCount="6553600"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="true"/>
|
<security mode="Message">
|
<transport realm=""/>
|
<message algorithmSuite="Default"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_IMessageCenter"
|
closeTimeout="00:01:00" openTimeout="00:00:30"
|
receiveTimeout="04:00:00" sendTimeout="00:00:10"
|
bypassProxyOnLocal="false" transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="524288"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="6553600"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="6553600"
|
maxNameTableCharCount="6553600"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="true"/>
|
<security mode="Message">
|
<transport realm=""/>
|
<message algorithmSuite="Default"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_IAPCommonService"
|
closeTimeout="00:01:00" openTimeout="00:00:30"
|
receiveTimeout="04:00:00" sendTimeout="00:00:10"
|
bypassProxyOnLocal="false" transactionFlow="false"
|
hostNameComparisonMode="StrongWildcard"
|
maxBufferPoolSize="524288"
|
maxReceivedMessageSize="2147483647"
|
messageEncoding="Text" textEncoding="utf-8"
|
useDefaultWebProxy="true" allowCookies="false">
|
<readerQuotas maxDepth="6553600"
|
maxStringContentLength="2147483647"
|
maxArrayLength="2147483647"
|
maxBytesPerRead="6553600"
|
maxNameTableCharCount="6553600"/>
|
<reliableSession ordered="true" inactivityTimeout="00:10:00"
|
enabled="true"/>
|
<security mode="Message">
|
<transport realm=""/>
|
<message algorithmSuite="Default"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_ICommonService1">
|
<security mode="Message">
|
<transport clientCredentialType="Windows"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_IDataDictService1">
|
<security mode="Message">
|
<transport clientCredentialType="Windows"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_ICommonService2">
|
<security mode="Message">
|
<transport clientCredentialType="Windows"/>
|
</security>
|
</binding>
|
<binding name="WSHttpBinding_ICommonService3">
|
<security mode="TransportWithMessageCredential">
|
<transport clientCredentialType="Windows"
|
proxyCredentialType="None"/>
|
<message clientCredentialType="Windows"
|
establishSecurityContext="false"
|
negotiateServiceCredential="false"/>
|
</security>
|
</binding>
|
</wsHttpBinding>
|
</bindings>
|
<client>
|
<endpoint
|
address="http://localhost:2345/WCF_Server/CommonService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_ICommonService"
|
contract="WCF_CommonService.ICommonService"
|
name="WSHttpBinding_ICommonService">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint
|
address="http://localhost:2345/WCF_Server/DataDictService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_IDataDictService"
|
contract="WCF_DataDictService.IDataDictService"
|
name="WSHttpBinding_IDataDictService">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint
|
address="http://localhost:2345/WCF_Server/MessageCenter.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_IMessageCenter"
|
contract="WCF_MessageCenter.IMessageCenter"
|
name="WSHttpBinding_IMessageCenter">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint
|
address="http://localhost:2345/WCF_Server/SystemSecurityService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_ISystemSecurityService"
|
contract="WCF_SystemSecurityService.ISystemSecurityService"
|
name="WSHttpBinding_ISystemSecurityService">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint address="http://localhost:2345/WCF_Server/APService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_IAPCommonService"
|
contract="WCFContract.IAPCommonService"
|
name="WSHttpBinding_IAPCommonService">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint address="https://cs5.manonwo.com/CommonService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_ICommonService1"
|
contract="MyCommonService.ICommonService"
|
name="WSHttpBinding_ICommonService1">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint address="https://cs5.manonwo.com/DataDictService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_IDataDictService1"
|
contract="MyDataDictService.IDataDictService"
|
name="WSHttpBinding_IDataDictService1">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint address="https://cs5.manonwo.com/CommonService.svc"
|
behaviorConfiguration="SSL_ClientBehavior"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_ICommonService2"
|
contract="ServiceReference1.ICommonService"
|
name="WSHttpBinding_ICommonService2">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
<endpoint address="https://cs5.manonwo.com/CommonService.svc"
|
binding="wsHttpBinding"
|
bindingConfiguration="WSHttpBinding_ICommonService3"
|
contract="MyMessageWCF.ICommonService"
|
name="WSHttpBinding_ICommonService3">
|
<identity>
|
<dns value="localhost"/>
|
</identity>
|
</endpoint>
|
</client>
|
<!--endpoint的行为配置:behaviorConfiguration-->
|
<!--用于配置客户端SSL证书信息-->
|
<behaviors>
|
<endpointBehaviors>
|
<behavior name="SSL_ClientBehavior">
|
<clientCredentials>
|
<clientCertificate findValue="cs5.manonwo.com"
|
storeLocation="LocalMachine"
|
x509FindType="FindBySubjectName"
|
storeName="My"/>
|
<serviceCertificate>
|
<authentication
|
certificateValidationMode="PeerOrChainTrust"/>
|
</serviceCertificate>
|
</clientCredentials>
|
</behavior>
|
</endpointBehaviors>
|
</behaviors>
|
</system.serviceModel>
|
</configuration>
|