Last post May 10, 2014 11:07 PM by MSDN_ice
May 08, 2014 12:38 AM|xmione|LINK
Tried the following configuration in the Web.config file:
but the next error would say "The element 'system.web' has invalid child element 'system.web.extensions'".
Tried to google it and found out that system.web.extensions is one of the obsolete assemblies in framework 4.5.
This is my web service method by the way.
[ScriptMethod(ResponseFormat = ResponseFormat.Json )]
public List<GridQuestion> GetAllQuestions(string sortColumn, string sortOrder)
QuestionsRepository questionsRepository = new QuestionsRepository();
List<GridQuestion> questions = questionsRepository.GetAllGridQuestions();
I did it that way for all of my web service methods and it was ok except for this one.
What's wrong? How do I increase the maxJsonlength?
Also tried this one but it didn't work:
serializer.MaxJsonLength = Int32.MaxValue;
string questionString = serializer.Serialize(questions);
questions = (List<GridQuestion>)serializer.Deserialize<List<GridQuestion>>(questionString);
Thanks in advance.
May 08, 2014 05:39 AM|xmione|LINK
Solved! Turns out this code actually works...Just misplaced it under system.web. Should be directly under the configuration tag.
May 10, 2014 11:07 PM|MSDN_ice|LINK
Thanks for your solution, and there is a similar issue with solutions, hope help others.