Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am getting following exception from the my WCF service one for the method with return type object[].


An error occurred while receiving the HTTP response to http://gcotdvm3722126/CAT.NextGenService/NextGenService.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.

Reference Points.
1. I have hosted my WCF service in IIS and calling it from a WPF application.
2. I could debug and get result from all the methods with return type string and int except with the method with object[] as the return type.

object [] MyMethod(string foo1, string foo2)
3. I could also debug the above method, hit the service and get results from my data access layer but it breaks after that with the aforementioned exception.

Server config file
<?xml version="1.0"?>
    <add key="CATDbEnv" value="CATDB_CLOUD2"/>
    <add name="LEGACYCATDB_CLOUD2" connectionString="user id=legacycat;password=legacycat;data source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = = 1522)))(CONNECT_DATA = (SID = CAT)))" providerName="System.Data.OracleClient"/>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime maxRequestLength ="262144" executionTimeout="103600"/>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception informaton -->
    <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <serviceDebug includeExceptionDetailInFaults="false"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <modules runAllManagedModulesForAllRequests="true"/>


Client Config File

<?xml version="1.0"?>
                <binding name="BasicHttpBinding_INextGenService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
                  <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                        <message clientCredentialType="UserName" algorithmSuite="Default"/>
            <endpoint address="http://gcotdvm3722126/CAT.NextGenService/NextGenService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_INextGenService" 
                      behaviorConfiguration="endpointBehavior" contract="INextGenService" name="BasicHttpBinding_INextGenService"/>
          <behavior name="endpointBehavior">
            <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

Thanks in advance !!

Thanks, Tapas
"Happy Coding"
Updated 7-May-17 21:36pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900