I am using WCF Web Api 4.0 and running in maxReceivedMessageSize, exceeding 65,000 errors.
I updated my webconfig to look like this, but because I am uisng WCF Web Api. I think this is not even used as I no longer use webHttpEndpoint?
<standardEndpoints> <webHttpEndpoint> <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" maxReceivedMessageSize="4194304" /> </webHttpEndpoint>
Where to specify MaxReceivedMessageSize in the new WCF Web Api?
I also tried CustomHttpOperationHandlerFactory to no avail:
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); } }
source share