"HTTP status 413: Request Entity Too Large" exception while consuming WCF service in Visual Studio 2005 app RRS feed

  • Question

  • Hello,

    I have created a WFC service in VS 2010 and trying to consume it into a Visual Studio 2005 (.Net 2.0) website... added same service using "Add Web Reference" but while invoking service method... getting "HTTP status 413: Request Entity Too Large" exception.

    I have analysed same exception and found when my request parameter size comes under 68kb then it works find but when it goes up then it through "HTTP status 413: Request Entity Too Large" error. 

    One more thing, I had consumed same service in VS2008 and VS2010 website and it's working fine with all size of request parameters.

    I have already set maxReceivedMessageSize with it's max size in WCF service web.config

    So please advise, what should i do so that my service could work in VS2005 properly with all sizes.


    • Edited by HarshGoel Saturday, July 13, 2013 6:40 AM
    Saturday, July 13, 2013 6:39 AM

All replies

  • Hi,

    Do you try using  wsdl.exe to create proxies for .NET 2.0 clients? Moreover, find suggestions at to check if it helps.

    If it cannot solve the issue, please try enable tracing for your service to get more detail error messages and analysis the logs with SvcTraceViewer.exe.

    Best Regards.

    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Sunday, July 14, 2013 11:58 PM
  • Thanks Haixia for your reply.

    I tried all suggestions as mentioned in Code Project link but no effect.

    I traced out the same as you suggested and found same exception: 

    Exception Type: System.ServiceModel.ProtocolException, System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

    As per above error we should increase size but in VS2005 no such elements exists in web.config however we can set in VS2008/10.

    MaxReceivedMessageSize is already set in WCF service web.config with max size.

    Please help...

    Monday, July 15, 2013 8:25 AM