Unable to load report with many record, Error (400) Bad Request RRS feed

  • Question

  • Please help, any suggestion are highly welcomed. I have a webpage that has a report inside, it work fine when there is not many records, but when it have more than 400 records, it will have the following error:

    The remote server returned an error: (400) Bad Request.

    An error has occurred during report processing.
    Exception has been thrown by the target of an invocation.
    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    my aspx page
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutputSummReport.aspx.cs" Inherits="WebSite.OutputReport" %>
    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="" >
    <head runat="server">
        <form id="form1" runat="server">
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
                Font-Size="8pt" ShowPrintButton ="False" Height="600px" Width="1100px">
                <LocalReport ReportPath="Output Summary Report.rdlc">
                        <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" 
                            Name="OutReportDataSet_GetOutRecordsForReport" />
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
                    <asp:Parameter Name="OrderList" Type="String" />
                    <asp:Parameter Name="OrgID" Type="String" />

    the code behind
    using System;
    using System.Data;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using Microsoft.Reporting.WebForms;
    namespace WebSite
        public partial class OutputReport : System.Web.UI.Page
            protected void Page_Load(object sender, EventArgs e)
                ReportViewer1.Visible = true;
                string mqids = Session["SelectedMQID"].ToString();
                string id = Request.QueryString["orgid"];
                Parameter p1 = new Parameter("OrderList", System.Data.DbType.String, mqids.ToString());
                Parameter p2 = new Parameter("OrgID", System.Data.DbType.String, id.ToString());
                Session["SelectedMQID"] = null;
    Thursday, March 18, 2010 8:08 AM

All replies

  • You can try changing the connection timeout in the connection string for your data source. See this thread for more info:


    Cephas Lin This posting is provided "AS IS" with no warranties.
    Thursday, July 22, 2010 4:07 PM
  • Hi..................

    Hey your problem is with the  Service Time out.

    Open your web.config file and increae receiveTimeout and sendTimeout. your problem may be solved.

    If still you face same problem then increase the size of maxArrayLength,maxReceivedMessageSize,maxBufferPoolSize.


        <binding name="wsHttpBindingForLargeQuotas" closeTimeout="00:01:00" transactionFlow="true" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="20971520" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
         <readerQuotas maxDepth="64" maxStringContentLength="20971520" maxArrayLength="20971520" maxBytesPerRead="4096" maxNameTableCharCount="20971520"/>
         <security mode="Message">
          <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
          <message clientCredentialType="Windows" negotiateServiceCredential="true"
            algorithmSuite="Default" />
    Friday, July 30, 2010 11:25 AM