I am getting the following error when my javascript attempts to execute the SaveUserCostCentreList MVC Controller Action using $.ajax Post. The error gets displayed before I can step into the method on the Server Controller.

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Parameter name: input

I have tried setting the maxJsonLength property and other properties relating to data sizes within the web.config but nothing works.

Please clarify. Is this code which I have to add to the server Controller SaveUserCostCentreList method? I am uploading my json object view model to the controller using POST, Is this not applicable to server Get requests rather than server Post requests?