. Research on the basichttpsbinding generated by default in WCF in NET4.5

Source: Internet
Author: User

Cause:

A blank WCF service was established using. net4.5. The binding configuration used by default is basichttpsbinding.

Problem finding:

1, the service reference with the client, generated the default configuration file, where the binding configuration is BasicHttpBinding.

2, because a single pass of large quantities of data, so modify the binding configuration, as follows:

   <BasicHttpBinding>        <bindingname= "Basichttpbinding_iservice"Closetimeout= "00:10:00"ReceiveTimeout= "00:10:00"Sendtimeout= "00:10:00"MaxReceivedMessageSize= "2147483647"maxBufferSize= "2147483647" >          <ReaderquotasmaxDepth= "2000000"Maxstringcontentlength= "2147483647"Maxarraylength= "2147483647"Maxbytesperread= "2147483647"Maxnametablecharcount= "2147483647" />        </binding>      </BasicHttpBinding>

3, run the test, always prompt "413 Request Entity Too Large". Find information on the internet, basically said to modify the default size, the default is 4M, modify to be large enough. But I clearly already in the service side and the client have changed ah???

Problem solving:

Study for a long time to solve, directly say the result.

Under the framework of. NET 4.5, the default generated binding configuration is Basichttpsbinding, which is HTTPS, which is one more s.

However, I changed the binding configuration in HTTPS on the server, not the binding configuration of HTTP, but the HTTP in the client. So the final use of the default HTTP configuration, the size is 4M, the amount of data a large, natural error.

When it comes to this, the solution is obvious.

End:

HTTP is still low efficiency, try using TCP tomorrow.

  

. Research on the basichttpsbinding generated by default in WCF in NET4.5

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.