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.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.