In a bit of admin functionality for a particular site, I'm doing a particularly horrific post that necessitates a large amount of data to be posted. In order to make that happen, I had to add the Web.config appSetting:
<add key="aspnet:MaxHttpCollectionKeys" value="2000" />
However, I only want this large post to be possible under a particular set of circumstances. Is there any way to programmatically set this value?
Looks like it's not possible, per this answer:
https://stackoverflow.com/a/10753846/570190
"You cannot override this because the reading of the setting and the default value is done inside an internal class."
You could make the setting specific to a location by placing the appSetting under a location tag in your web.config.
http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With