none
WCF - 413 Request Entity Too Large RRS feed

  • Question

  • I have an wcf service which uploads one file. the problem is that it keeps the same result which is 413 Request Entity Too Large exception:

    web config:

          <services>
            <service name="Test.TestService">
              <endpoint address="" binding="basicHttpBinding"
                contract="Test.ITestService" />
            </service>
           </services>
          <behaviors>
             <serviceBehaviors>
               <behavior name="">
                <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
              </behavior>
            </serviceBehaviors>
          </behaviors>

    Sunday, January 31, 2016 12:33 PM

Answers

  • Hello,

    I have checked your project, it seems that you do not configure the service to allow transfer large data. By default the data size can be transfered in the WCF Service is 64kb, so you will meet error if your file size is more than 64kb. So please check this article to configure your service for large data transfer:
    http://blogs.msdn.com/b/ryberry/archive/2010/04/20/transferring-large-blogs-of-data-with-wcf.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by qaz_123 Tuesday, February 2, 2016 1:04 PM
    Sunday, January 31, 2016 1:56 PM
    Moderator

All replies

  • Hello,

    I have checked your project, it seems that you do not configure the service to allow transfer large data. By default the data size can be transfered in the WCF Service is 64kb, so you will meet error if your file size is more than 64kb. So please check this article to configure your service for large data transfer:
    http://blogs.msdn.com/b/ryberry/archive/2010/04/20/transferring-large-blogs-of-data-with-wcf.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by qaz_123 Tuesday, February 2, 2016 1:04 PM
    Sunday, January 31, 2016 1:56 PM
    Moderator
  • Thank You Amy, it works.
    Tuesday, February 2, 2016 1:05 PM
  • You are welcome. :)

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 2, 2016 1:20 PM
    Moderator
  • Hi Amy,

    Can you help me about this question:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/c6bf8162-fc81-4eb2-9933-1a87f1e5cef1/wcf-security?forum=wcf

    Tuesday, February 2, 2016 1:23 PM
  • Hello,

    I have replied this thread, please try to check it. :)

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 3, 2016 7:11 AM
    Moderator