Thursday, April 21, 2016

WCF REST Service Error "Request Entity too large"

Recently I had this issue in my WCF service, this service was for file upload and download.

in uploading the file, WCF was throwing an error of Request entity too large. later after some searching on net, I have found to change the web.config for webhttpBinding, like below.

<system.serviceModel>

<bindings>
  
<webHttpBinding>
   
<binding
     
maxBufferPoolSize="2147483647"
     
maxReceivedMessageSize="2147483647"
     
maxBufferSize="2147483647" transferMode="Streamed">
   
</binding> 
  
</webHttpBinding>
</bindings>

which worked fine for me.

No comments:

Post a Comment