Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


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?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!