User avatar
Mattias
GpsGate
Posts: 135
Joined: Wed Dec 16, 2009 3:59 pm
Location: Sweden

FIX: Unable to save application in SiteAdmin

Fri Feb 10, 2012 8:08 pm

Note: for an updated version of this and other articles, we recommend you to check our knowledge base here

SYMPTOM

You get an error similar to the following when browsing the Device Type page in SiteAdmin or when saving an Application in SiteAdmin

"Server Error in '/GpsGateServer' Application.

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

Stack Trace:
System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()"

CAUSE

This error occurs because of the amount of form fields that your device type contains. A limit of 1000 form fields was added in an ASP.NET security fix recently released by Microsoft.

See here for more info about the security fix: http://weblogs.asp.net/scottgu/archive/2011/12/28/asp-net-security-update-shipping-thursday-dec-29th.aspx

SOLUTION

You can raise the limit by adding an application setting in the GpsGateServer/IIS/Web.config file.

<appSettings>
...
<add key="aspnet:MaxHttpCollectionKeys" value="5000"/>
</appSettings>

Regards,
Mattias

simonaogstino
Posts: 76
Joined: Wed Apr 10, 2013 3:28 pm
Location: Iraq
Contact: Website

RE: FIX: Unable to save application in SiteAdmin

Sun Nov 30, 2014 12:40 pm

Many thanks Mattias and support team it is working.
Thanks

<font color="blue">Simon Aogstino</font id="blue">

Return to “GpsGate Server - How to setup and use”