Our application is giving the following error in a large form:
System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte bytes, Encoding encoding) at System.Web.HttpRequest.FillInFormCollection()
When I investigated the problem, we found it was related to MS11-100.
The recommendationis to the following entry to the appsettings:
<add key="aspnet:MaxHttpCollectionKeys" value="36001" />
However, after adding the key in the Sharepoint Web Application, it is still giving the same error.
I have tried adding the key both manually in the web.config and programmatically using the SPWebConfigModification
Should this setting work in SharePoint?
Could I have something wrong in my infrastucture that SharePoint is simply not taking into consideration the web.config changes?
Any suggestions of how best to investigate this issue please?
Any assistance woul be greatly appreciated.