Friday, May 24, 2013

WCF-CommunicationException-This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

I got this error when trying to send a list of 5000 items (large list). Setting maxItemsInObjectGraph="2147483647" didn't help.

An error occurred while receiving the HTTP response to http://localhost:51923/Service1.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.

SOLUTION
=========
Added <httpRuntime maxRequestLength ="262144" executionTimeout="103600"/> in the <system.web> section. It worked.

Hope this helps you.

3 comments:

  1. Thanks. It's help while uploading large data though xls...

    ReplyDelete
  2. Hi,i am just trying sample wcf service which returns countries and states(seperate methods) in the form of datatable i also got the same error and i tried your solution but it didn't fixed my issue please give me any other solution.

    ReplyDelete