When making a picture query, the error has exceeded the maximum message size quota for incoming messages (65536). To increase the quota, use the MaxReceivedMessageSize property on the corresponding binding element.
Because the picture is stored in the database, so the data volume is larger.
The WCF default transfer value is 65536 bytes (64KB), which is too small, I directly changed to 50M (52428800 bytes), the internet said the maximum is 2147483647 bytes supported, but the MaxReceivedMessageSize property is a long type, It should be bigger than this.
Note that only TCP, IPC, and basic HTTP bindings support streaming operations, and only basic HTTP is interoperable. There are also maxreceivedmessagesize properties that are configured on the client.
<system.serviceModel> <bindings> <basicHttpBinding> <binding name= " Basichttpbinding_iservice " transfermode=" Streamed " maxreceivedmessagesize=" 52428800 " closetimeout= "00:03:00" opentimeout= "00:03:00" sendtimeout= "00:03:00" receivetimeout= "00:03:00"/> </ basichttpbinding> </bindings> <client> <endpoint address= "http://localhost : 8006/http "binding=" BasicHttpBinding " bindingconfiguration=" Basichttpbinding_iservice "contract=" Server.iservice " name=" Basichttpbinding_iservice "/> </client> </system.servicemodel >
WCF has exceeded the maximum message size quota for incoming messages (65536). To increase the quota, use the MaxReceivedMessageSize property on the corresponding binding element.