撰寫C# Win Form 呼叫一個Web Service , 由於資料量過大,所以發生MaxReceivedMessageSize 的錯誤
調整App.Config 即可解決這個問題
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
**<basicHttpBinding>
<binding name="MobileWebServiceSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferPoolSize="524288">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>**
</bindings>
<client>
<endpoint address="http://www.xxxx.com.tw/mobileWebservice.asmx"
binding="basicHttpBinding" bindingConfiguration="MobileWebServiceSoap"
contract="WebServiceGT.MobileWebServiceSoap" name="MobileWebServiceSoap" />
</client>
</system.serviceModel>
</configuration>