WCF Web Api 4.0フレームワークを使用していて、maxReceivedMessageSizeが65,000エラーを超えました。
webconfigを次のように更新しましたが、WCF Web Apiを使用しているため、webHttpEndpointを使用しなくなったため、これはもう使用されていないと思いますか?
<standardEndpoints>
<webHttpEndpoint>
<!--
Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below
-->
<standardEndpoint name=""
helpEnabled="true"
automaticFormatSelectionEnabled="true"
maxReceivedMessageSize="4194304" />
</webHttpEndpoint>
新しいWCFWebAPIのMaxReceivedMessageSizeはどこで指定しますか?
CustomHttpOperationHandlerFactoryも試してみましたが、役に立ちませんでした。
public class CustomHttpOperationHandlerFactory: HttpOperationHandlerFactory
{
protected override System.Collections.ObjectModel.Collection<HttpOperationHandler> OnCreateRequestHandlers(System.ServiceModel.Description.ServiceEndpoint endpoint, HttpOperationDescription operation)
{
var binding = (HttpBinding)endpoint.Binding;
binding.MaxReceivedMessageSize = Int32.MaxValue;
return base.OnCreateRequestHandlers(endpoint, operation);
}
}