Try to add the below configurations.
Binding configuration.
<binding name="mybinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
DataConstractSerializer.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mybehavior">
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
Don’t forget to apply the configuration between the client-side and server-side (we are supposed to add this configuration on both the client-side and server-side endpoints). Add the bindingConfiguration and behaviorConfiguration in the service section.
<system.serviceModel>
<services>
<service name="WcfService2.Service1" behaviorConfiguration="mybehavior">
<endpoint address="" binding="wsHttpBinding" contract="WcfService2.IService1" bindingConfiguration="mybinding"/>
Feel free to let me know if the problem still exists.