#2
x1834357392015-02-06 14:38
|
只有本站会员才能查看附件,请 登录
Server端配置
程序代码:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<appSettings>
<add key="BufferSize" value="4096" />
<add key="ConStringEncrypt" value="false" />
<add key="ConnectionString" value="Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 1521))(CONNECT_DATA =(SERVICE_NAME = ORCL)));uid=reliableanalysis;pwd=reliableanalysis;" />
</appSettings>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WS_BlogBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" 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"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Com.PT.Server.Services.UserService" name="Com.PT.Server.Services.UserService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WS_BlogBinding" contract="Com.PT.Server.Services">
<identity>
<dns value="TestCert" />
</identity>
</endpoint>
<endpoint address="" binding="wsHttpBinding" contract="IMetadataExchange" bindingConfiguration="WS_BlogBinding" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="http://127.0.0.1:8080/bindData/USER">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceThrottling maxConcurrentCalls="10000" maxConcurrentInstances="10000" maxConcurrentSessions="10000"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<appSettings>
<add key="BufferSize" value="4096" />
<add key="ConStringEncrypt" value="false" />
<add key="ConnectionString" value="Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.2)(PORT = 1521))(CONNECT_DATA =(SERVICE_NAME = ORCL)));uid=reliableanalysis;pwd=reliableanalysis;" />
</appSettings>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WS_BlogBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" 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"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Com.PT.Server.Services.UserService" name="Com.PT.Server.Services.UserService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WS_BlogBinding" contract="Com.PT.Server.Services">
<identity>
<dns value="TestCert" />
</identity>
</endpoint>
<endpoint address="" binding="wsHttpBinding" contract="IMetadataExchange" bindingConfiguration="WS_BlogBinding" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="http://127.0.0.1:8080/bindData/USER">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceThrottling maxConcurrentCalls="10000" maxConcurrentInstances="10000" maxConcurrentSessions="10000"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Client端配置
程序代码:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WS_BlogBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" 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"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://127.0.0.1:8080/bindData/USER" binding="wsHttpBinding"
bindingConfiguration="WS_BlogBinding" contract="SR_Server.KKXFX_Blog"
name="WSHttpBinding_KKXFX_Blog" />
</client>
</system.serviceModel>
</configuration>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WS_BlogBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" 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"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://127.0.0.1:8080/bindData/USER" binding="wsHttpBinding"
bindingConfiguration="WS_BlogBinding" contract="SR_Server.KKXFX_Blog"
name="WSHttpBinding_KKXFX_Blog" />
</client>
</system.serviceModel>
</configuration>