<system.serviceModel>
<!--<bindings>
<customBinding>
<binding name="customBinding">
<binaryMessageEncoding>
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="64"/>
</binaryMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483647">
</httpTransport>
</binding>
</customBinding>
<basicHttpBinding>
<binding name="basicBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="64"/>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="" name="DataService.Service1">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicBinding" contract="DataService.IDataService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
--><!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false --><!--
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
--><!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 --><!--
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>-->
<bindings>
<basicHttpBinding>
<!--<binding name="basicBinding" maxReceivedMessageSize="2147483647" messageEncoding="Text" transferMode="Streamed" sendTimeout="00:30:00" />-->
<binding name="BasicHttpBinding_IDataService" closeTimeout="00:03:00"
openTimeout="00:03:00" receiveTimeout="00:30:00" sendTimeout="00:03:00" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="9223372036854775807"
messageEncoding="Text" transferMode="Streamed">
<readerQuotas maxDepth="32" maxStringContentLength="90000000" maxArrayLength="90000000"
maxBytesPerRead="90000000" maxNameTableCharCount="90000000" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="DataService.IDataServiceBehavior" name="DataService.Service1">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDataService" contract="DataService.IDataService" >
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DataService.IDataServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IDataService" closeTimeout="00:03:00"
openTimeout="00:03:00" receiveTimeout="00:30:00" sendTimeout="00:03:00" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="9223372036854775807"
messageEncoding="Text" transferMode="Streamed">
<readerQuotas maxDepth="32" maxStringContentLength="90000000" maxArrayLength="90000000"
maxBytesPerRead="90000000" maxNameTableCharCount="90000000" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:27324/DataService.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IDataService" contract="DataService.IDataService"
name="BasicHttpBinding_IDataService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</client>
</system.serviceModel>
BasicHttpBinding ws = new BasicHttpBinding();
ws.MaxBufferSize = 2147483647;
ws.MaxBufferPoolSize = 2147483647;
ws.MaxReceivedMessageSize = 2147483647;
ws.ReaderQuotas.MaxStringContentLength = 2147483647;
ws.CloseTimeout = new TimeSpan(0, 10, 0);
ws.OpenTimeout = new TimeSpan(0, 10, 0);
ws.ReceiveTimeout = new TimeSpan(0, 10, 0);
ws.SendTimeout = new TimeSpan(0, 20, 0);
bindinginstance = ws;
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。