Server 端 webconfig
紅色為需修改的地方。
<bindings>
<basicHttpBinding>
<binding name="StructurProdFormContract" messageEncoding="Mtom">
<readerQuotas maxArrayLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client />
<services>
<service name="PSG.Warrant.WarrantReport" />
<service name="PSG.Warrant.WarrantIssue" />
<service name="PSG.Warrant.StructureProdForm">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="StructurProdFormContract"
contract="PSG.Warrant.IStructureProdForm" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 為避免中繼資料資訊洩漏,部署之前請將下面的值設定為 false,並移除上面的中繼資料端點-->
<serviceMetadata httpGetEnabled="true"/>
<!-- 為接收錯誤中的例外狀況詳細資料以用於偵錯用途,請將下面的值設定為 true。請在部署之前將該值設定為 false,以避免例外狀況資訊洩漏-->
<serviceDebug includeExceptionDetailInFaults="false"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
Client 端
<binding name="BasicHttpBinding_IStructureProdForm" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="2147483647"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>