私は WCF を初めて使用し、サービスが取る構成の迷宮を回避しようとしています。デフォルトよりも大きいテーブルのエクスポートを返すことができる残りのサービスがあります maxReceivedMessageSize
。だから私はこのサービス/エンドポイントの構成をいじろうとしてきましたが、どこにも行きません。以下は、私が取り組んでいることの要点ですが、何が欠けていますか? List を JSON または XML として返すだけで、デフォルトのしきい値を超えて返せるようにする必要があります。
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<!-- defin service -->
<service behaviorConfiguration="EPRestBehavior" name="EPRestDNS">
<endpoint address=""
bindingConfiguration="ApiExportBinding"
binding="webHttpBinding"
contract="IDNSRestService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="EPRestBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
...
</behaviors>
<bindings>
<!-- Customizations for REST service -->
<webHttpBinding>
<binding name="ApiExportBinding" maxReceivedMessageSize="10485760"
maxBufferPoolSize="10485760" maxBufferSize="10485760" closeTimeout="00:03:00"
openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00">
<readerQuotas maxDepth="32" maxStringContentLength="10485760"
maxArrayLength="10485760" maxBytesPerRead="10485760" />
<security mode="None" />
</binding>
</webHttpBinding>
</bindings>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
</webHttpEndpoint>
</standardEndpoints>
更新 1 その構成をすべて削除し、既存の webHttpEndpoint セクションで簡単なことを試しました。
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="1000000000" />
</webHttpEndpoint>
</standardEndpoints>
同じ結果で。 HTTP/1.1 502 Connection reset by peer