max size for form fields?

  • Thread starter Thread starter George Birbilis
  • Start date Start date
G

George Birbilis

http://www.support.microsoft.com/default.aspx?scid=kb;EN;q273482

the above speaks for ASP and IIS4, but is it true for the IIS version that
comes with Win2000 and with ASP.net?

that is, cause at some very big forms, I get lots of the following errors:

System.Web.HttpException: The viewstate is invalid for this page and might
be corrupted.

at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()

at System.Web.UI.Page.LoadPageViewState()

at System.Web.UI.Page.ProcessRequestMain().


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <[email protected]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
.........................................................................
 
The first question that comes to mind is, how much data are you trying to
post? The error message you posted seems to be unrelated, but if you are
posting over the limit stated in the KB article, it might be.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
The first question that comes to mind is, how much data are you trying to
post? The error message you posted seems to be unrelated, but if you are
posting over the limit stated in the KB article, it might be.

thanks for your reply,

1) the _VIEWSTATE form field can be more than 128KB in that form and the
total form is 600KB+ (can't change that, it's many very big forms)

2) in machine.config for ASP.net1.1 I see:

<!--
httpRuntime Attributes:
executionTimeout="[seconds]" - time in seconds before request is
automatically timed out
maxRequestLength="[KBytes]" - KBytes size of maximum request
length to accept
useFullyQualifiedRedirectUrl="[true|false]" - Fully qualifiy the
URL for client redirects
minFreeThreads="[count]" - minimum number of free thread to allow
execution of new requests
minLocalRequestFreeThreads="[count]" - minimum number of free
thread to allow execution of new local requests
appRequestQueueLimit="[count]" - maximum number of requests queued
for the application
enableKernelOutputCache="[true|false]" - enable the http.sys cache
on IIS6 and higher - default is true
enableVersionHeader="[true|false]" - outputs X-AspNet-Version
header with each request
-->
<httpRuntime executionTimeout="90" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"
enableVersionHeader="true"/>

so the "maxRequestLength" may be related to the problem, but since locally
on my machine it works (and with many other remote machines it works OK with
600Kb form sizes) and only in random users it logs theses errors, it's very
strange

thanks for any insight on that, I'm thinking of overriding the
httpRuntime/maxRequestLength in my web.config file, but not sure how big to
set it (how can I find [can log them then easily to the event log] the
request sizes to see how big a number they reach?)

so since maxRequestLength is 4096 KBytes and not overriden currently at
web.config, I don't see how this one could be the problem, but I wonder if
there's some IIS5 setting somewhere related to that problem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <[email protected]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
.........................................................................
 
Hi George,

First, I would question whether it is truly not possible to break your form
into smaller pieces. The intermitttent problem is no doubt linked to the
size of the Request. Although the maxRequestLength may be small enough, it
may have something to do with the executionTimeout configuration, which
limits the length of time a Request can take, and this may have something to
do with it. Other than that, I can't think of anything.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

George Birbilis said:
The first question that comes to mind is, how much data are you trying to
post? The error message you posted seems to be unrelated, but if you are
posting over the limit stated in the KB article, it might be.

thanks for your reply,

1) the _VIEWSTATE form field can be more than 128KB in that form and the
total form is 600KB+ (can't change that, it's many very big forms)

2) in machine.config for ASP.net1.1 I see:

<!--
httpRuntime Attributes:
executionTimeout="[seconds]" - time in seconds before request is
automatically timed out
maxRequestLength="[KBytes]" - KBytes size of maximum request
length to accept
useFullyQualifiedRedirectUrl="[true|false]" - Fully qualifiy the
URL for client redirects
minFreeThreads="[count]" - minimum number of free thread to allow
execution of new requests
minLocalRequestFreeThreads="[count]" - minimum number of free
thread to allow execution of new local requests
appRequestQueueLimit="[count]" - maximum number of requests queued
for the application
enableKernelOutputCache="[true|false]" - enable the http.sys cache
on IIS6 and higher - default is true
enableVersionHeader="[true|false]" - outputs X-AspNet-Version
header with each request
-->
<httpRuntime executionTimeout="90" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"
enableVersionHeader="true"/>

so the "maxRequestLength" may be related to the problem, but since locally
on my machine it works (and with many other remote machines it works OK with
600Kb form sizes) and only in random users it logs theses errors, it's very
strange

thanks for any insight on that, I'm thinking of overriding the
httpRuntime/maxRequestLength in my web.config file, but not sure how big to
set it (how can I find [can log them then easily to the event log] the
request sizes to see how big a number they reach?)

so since maxRequestLength is 4096 KBytes and not overriden currently at
web.config, I don't see how this one could be the problem, but I wonder if
there's some IIS5 setting somewhere related to that problem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <[email protected]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................
 
if any of your users use a proxy server, it may truncate the viewstate. 4k
is a common max length for a text (hidden) field. (textareas are handled
differently).

you should pare the viewstate down to below 2k if its an internet site.

-- bruce (sqlwork.com)





George Birbilis said:
The first question that comes to mind is, how much data are you trying to
post? The error message you posted seems to be unrelated, but if you are
posting over the limit stated in the KB article, it might be.

thanks for your reply,

1) the _VIEWSTATE form field can be more than 128KB in that form and the
total form is 600KB+ (can't change that, it's many very big forms)

2) in machine.config for ASP.net1.1 I see:

<!--
httpRuntime Attributes:
executionTimeout="[seconds]" - time in seconds before request is
automatically timed out
maxRequestLength="[KBytes]" - KBytes size of maximum request
length to accept
useFullyQualifiedRedirectUrl="[true|false]" - Fully qualifiy the
URL for client redirects
minFreeThreads="[count]" - minimum number of free thread to allow
execution of new requests
minLocalRequestFreeThreads="[count]" - minimum number of free
thread to allow execution of new local requests
appRequestQueueLimit="[count]" - maximum number of requests queued
for the application
enableKernelOutputCache="[true|false]" - enable the http.sys cache
on IIS6 and higher - default is true
enableVersionHeader="[true|false]" - outputs X-AspNet-Version
header with each request
-->
<httpRuntime executionTimeout="90" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"
enableVersionHeader="true"/>

so the "maxRequestLength" may be related to the problem, but since locally
on my machine it works (and with many other remote machines it works OK with
600Kb form sizes) and only in random users it logs theses errors, it's very
strange

thanks for any insight on that, I'm thinking of overriding the
httpRuntime/maxRequestLength in my web.config file, but not sure how big to
set it (how can I find [can log them then easily to the event log] the
request sizes to see how big a number they reach?)

so since maxRequestLength is 4096 KBytes and not overriden currently at
web.config, I don't see how this one could be the problem, but I wonder if
there's some IIS5 setting somewhere related to that problem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <[email protected]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................
 
Back
Top