You suddenly start to receive an error message that resembles the following in various locations in Business Portal when you try to save something with multiple lines:

Server Error in '/' Application.

Operation is not valid due to the current state of the object.

[InvalidOperationException: Operation is not valid due to the current state of the object.]
System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +4141871


This can be caused by a recent windows update that was released which limits the number of HTTP collection keys in an ASP.NET application. 


Increase the limit of HTTP collection keys. To do this, follow these steps:

  1. On the server hosting the Business Portal website, browse out to the inetpub directory on the BP server

  2. Find the web.config file (typically in the C:\inetpub\wwwroot\wss\VirtualDirectories\80 folder)

  3. Make a backup copy of the web.config file

  4. Open the web.config file in notepad

  5. Scroll to the bottom until you find the <appSettings> tag

  6. After the <appSettings> tag, add the following:
    <add key="aspnet:MaxHttpCollectionKeys" value="100000"/>

  7. Save and try business portal again.

More Information

The following website has more information about the windows update:

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!