From: DavidC on
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
From: Brian Cryer on
"DavidC" <dlchase(a)lifetimeinc.com> wrote in message
news:A93A8A91-448B-4FF5-9A66-81DD3F1D3F1B(a)microsoft.com...
>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

From: DavidC on
The web.config change worked, thanks.
--
David


"Brian Cryer" wrote:

> "DavidC" <dlchase(a)lifetimeinc.com> wrote in message
> news:A93A8A91-448B-4FF5-9A66-81DD3F1D3F1B(a)microsoft.com...
> >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
>
> .
>