Click here to Skip to main content
15,896,489 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends
I have generate error like this when click submit buttion

C#
The maximum number of form, query string, or posted file items has already been read from the request. To change the maximum allowed request collection count from its current value of 20001, change the "aspnet:MaxHttpCollectionKeys" setting. See http://go.microsoft.com/fwlink/?LinkId=238386 for more information.



How to solve this
thanks
Posted
Comments
[no name] 23-Nov-15 2:54am    
Do you have HiddenFields in your form ? If Yes , Please try to reduce and/or replace them by something else which not involve form controls.
[no name] 23-Nov-15 4:37am    
Thanks

Please check this
C#
<appsettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appsettings>


or you would be to revise its number of controls on the page.
 
Share this answer
 
You need to increase the size of MaxHttpCollectionKeys until it is satisfactory, but increasing this key may actually increase the vulnerability of your server so need to attention on security of your application too. A good tip would be to revise (reduce as much as you can) number of controls on the page.
HTML
<appsettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="2500" />
</appsettings>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900