Maximum request length exceeded

Discussion in 'ASP .Net' started by DavidC, Jul 21, 2010.

  1. DavidC

    DavidC Guest

    I have an aspx web page that has a button using NavigateURL to point to the
    startup page. I am getting the following error opening the startup page
    (Default.aspx) when I have a very large GridView displayed in the preceding
    page. Can anyone help resolve? Thanks.

    An unhandled exception occurred:
    Message: Maximum request length exceeded.

    Stack Trace:
    at System.Web.HttpRequest.GetEntireRawContent()
    at System.Web.HttpRequest.FillInFormCollection()
    at System.Web.HttpRequest.get_Form()
    at System.Web.HttpRequest.get_HasForm()
    at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
    at System.Web.UI.Page.DeterminePostBackMode()
    at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



    --
    David
    DavidC, Jul 21, 2010
    #1
    1. Advertising

  2. DavidC

    DavidC Guest

    The web.config change worked, thanks.
    --
    David


    "Brian Cryer" wrote:

    > "DavidC" <> wrote in message
    > news:...
    > >I have an aspx web page that has a button using NavigateURL to point to the
    > > startup page. I am getting the following error opening the startup page
    > > (Default.aspx) when I have a very large GridView displayed in the
    > > preceding
    > > page. Can anyone help resolve? Thanks.
    > >
    > > An unhandled exception occurred:
    > > Message: Maximum request length exceeded.

    > <snip>
    >
    > Have you tried increasing the maxRequestLength in web.config, ie:
    >
    > <httpRuntime maxRequestLength="8192" />
    >
    > I know that helps when uploading files - resolves the same (or similar)
    > error.
    >
    > As an alternative appraoch, I'm guessing that if your GridView is very large
    > then that page has an enormous viewstate, and the page is probably quite
    > slow to load (partly but not just because of the large viewstate). Is it
    > feasible to turn viewstate off for the gridview?
    > --
    > Brian Cryer
    > http://www.cryer.co.uk/brian
    >
    > .
    >
    DavidC, Jul 21, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacky Kwok
    Replies:
    2
    Views:
    3,537
    Mark1969
    Jun 24, 2005
  2. =?Utf-8?B?Y21heQ==?=
    Replies:
    8
    Views:
    30,837
    SilentSojourner
    Apr 2, 2012
  3. Chris Hayes
    Replies:
    8
    Views:
    9,347
    DDaanV
    Oct 21, 2010
  4. Chris Hayes
    Replies:
    0
    Views:
    659
    Chris Hayes
    Jul 27, 2005
  5. Lloyd Dupont

    Maximum request length exceeded.

    Lloyd Dupont, Jan 19, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    22,260
    justin_yj
    Oct 29, 2010
Loading...

Share This Page