locked
WCF Data Service Call - Response Limit Issue RRS feed

  • Question

  • I have created a Empty Web app with WCF Data Entity Model and added the Database Table entities with Service and hosted the web app in the environment.

    The Table which call from service has 400 records and 40 columns.When I browse the SVC directly to the browser ,it gets all the records with 40 columns.  

    https://testsrv11:7302/TestService.svc/productInfo

    but when I query it from the Sharepoint app by the below code it shows the Error :  

    Status Code : 403 The Size of reponse from the remote endpoint exceeds the configured limit

    I have using the below code to call the WCF service:

    var context = SP.ClientContext.get_current();
    var request = new SP.WebRequestInfo();
    request.set_url("https://testsrv11:7302/TestService.svc/productInfo");
    request.set_method("GET");
    request.set_headers({ "Accept": "application/json;odata=verbose" });
    var response = SP.WebProxy.invoke(context, request);
    context.executeQueryAsync(successHandler2, errorHandler2);
      

    Then I have checked the WCF service web config and increase a response limit as below:

    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="1" />
        <services>
          <!-- The name of the service -->
          <service name="TestSvc.TestService">
            <!--you can leave the address blank or specify your end point URI-->
            <endpoint address="https://Testsrv11:7302/TestService.svc" binding="webHttpBinding" bindingConfiguration="WCFBinding" contract="System.Data.Services.IRequestHandler"></endpoint>
          </service>
        </services>
        <bindings>
          <webHttpBinding>
            <!-- configure the maxReceivedMessageSize value to suit the max size of 
                      the request (in bytes) you want the service to receive-->
            <binding name="WCFBinding" maxBufferSize="2147483647" maxBufferPoolSize="21474836474366" maxReceivedMessageSize="2147344555566543223" transferMode="Streamed">
              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
              <security mode="Transport">
                <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
              </security>
            </binding>
          </webHttpBinding>
        </bindings>
      </system.serviceModel>

    After Increase the limit of  maxReceivedMessageSize in the Web config settings,I am able to get 200 records only,

    When I Increase the top limit 205 or 300 get the same error.

    https://Testsrv11:7302/TestService.svc?$top=205

    Status Code : 403 The Size of reponse from the remote endpoint exceeds the configured limit

    I need to get all the Table records with all columns.I set the maxReceivedMessageSize to Maximum Int 32 number,but still able to get 200 records only.

    Is there any settings to get all the records with out any reponse limit?

    Please help me to solve this problem. Thanks in Advance...

    Saturday, July 12, 2014 9:57 AM