0

I have a WCF service running on my application. Whenever I pass large amount of data to the service I get this error

The remote server returned an unexpected response: (413) Request Entity Too Large.

How to solve this error?

I did R&D on this issue but did not find any suitable answers.

I am creating an entity dynamically which contains 53 fields, but when I try to add the 54th field this error is thrown.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Pranav
  • 85
  • 1
  • 2
  • 11
  • 1
    try 1. http://stackoverflow.com/questions/20575946/the-remote-server-returned-an-unexpected-response-413-request-entity-too-larg 2. http://www.codeproject.com/Articles/521725/Request-Entity-Too-Large – Abhinav Galodha Jul 17 '15 at 06:34
  • edit wcf configuration ->bind setting-> Max received buffer size and give it max value – Feras Salim Jul 17 '15 at 06:36
  • Thanks a lot..Voila it worked – Pranav Jul 17 '15 at 06:47
  • I had this issue early this week and I tried the solutions suggested by @Agalo, they are good but didn't work for me, although they pointed me to the right direction, I realizaed that rather than use you can use and it works. Also there are a couple of IIS params that can affect but not in my case. – Israel Menis Jul 17 '15 at 06:54

1 Answers1

2

The problem arises due to file size of the image

Can't upload large files using IIS

The fix is simply to up the size of the UploadReadAheadSize metabase property.

Reference 1,2,3

Community
  • 1
  • 1
Tharif
  • 13,794
  • 9
  • 55
  • 77
  • 1
    But no file is being uploaded..Got the solution. Web.config file for web service needs to be modified with receivedbuffersize binding.. – Pranav Jul 17 '15 at 06:47