これらのプロパティは、WCF Web API 構成に含まれていました。
MaxBufferSize = int.MaxValue,
MaxReceivedMessageSize = int.MaxValue,
これらのプロパティは、WCF Web API 構成に含まれていました。
MaxBufferSize = int.MaxValue,
MaxReceivedMessageSize = int.MaxValue,
自己ホストしている場合は、HttpSelfHostConfiguration クラスの一部です: HttpSelfHostConfiguration クラスの MSDN ドキュメント
次のように使用されます。
var config = new HttpSelfHostConfiguration(baseAddress);
config.MaxReceivedMessageSize = int.MaxValue;
config.MaxBufferSize = int.MaxValue;
ASP.NETアプリケーションのweb.configのhttpRuntimeセクションを確認することをお勧めします。それらは完全に同じ名前ではありませんが、あなたがやろうとしていることに類似したものがあるかもしれません。例えば:
<configuration>
<system.web>
<httpRuntime maxRequestLength="16384" requestLengthDiskThreshold="16384"/>
</system.web>
</configuration>
注:Int32.MaxValueは2,147,483,647です。
最初に、WCF App.config でこの構成を行います。
<endpoint address ="" binding="basicHttpBinding" bindingConfiguration="basicHttp" contract="AddSubService.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttp" allowCookies="true"
maxReceivedMessageSize="20000000"
maxBufferSize="20000000"
maxBufferPoolSize="20000000">
<readerQuotas maxDepth="32"
maxArrayLength="200000000"
maxStringContentLength="200000000"/>
</binding>
</basicHttpBinding>
</bindings>
次に、web.config で WCF を呼び出している ASP.NET 側で参照を更新してみて、エンドポイントが同じに変更されていることを確認します。