この問題が何百万回も投稿されているのを見てきましたが、どの解決策もうまくいきませんでした...だからここに行きます:
WCFサービスを呼び出すと、次のエラーが発生します。
フォーマッタは、メッセージを逆シリアル化しようとしたときに例外をスローしました。パラメータ http://BlanketImportService.ServiceContracts/2011/06:requestを逆シリアル化しようとしたときにエラーが発生しました。InnerExceptionメッセージは次のとおりです。'BlanketImport.BlanketImportRequestタイプのオブジェクトの逆シリアル化中にエラーが発生しました。XMLデータの読み取り中に、配列の最大長のクォータ(16384)を超えました。このクォータは、XMLリーダーの作成時に使用されるXmlDictionaryReaderQuotasオブジェクトのMaxArrayLengthプロパティを変更することで増やすことができます。1行目、位置44440。詳細については、InnerExceptionを参照してください。
両方のクライアントサーバーでを変更しreaderQuotas、bindingConfigurationタグを適用しました。
サーバー構成は次のとおりです。
<bindings>
<basicHttpBinding>
<binding name="BilagImportBinding" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="BlanketImport">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BilagImportBinding" bindingNamespace="http://BlanketImportService.ServiceContracts/2011/06" contract="BlanketImport.IBlanketImport">
</endpoint>
</service>
</services>
そして、クライアント構成:
<bindings>
<basicHttpBinding>
<binding name="BilagImportBinding" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/BlanketImport/BlanketService.svc"
binding="basicHttpBinding" bindingConfiguration="BilagImportBinding" contract="BlanketServiceReference.IBlanketService"
name="BasicHttpBinding_IBlanketService" />
</client>