Close

Error during serialization or deserialization using the json javascriptserializer

dinhvanvo
10 years ago
#2822 Quote
Avatar
  • 5
I'm using Nop 2.65 and the Nop Anywhere Sliders plugin has been installed. But when I try to configure the slider(in Admin -> Plugins -> Nop Anywhere Sliders -> Manage Sliders), I get the following error when I hit the 'Save' or 'Save and Continue' and Edit button:

[code]
Server Error in '/' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Source Error:


Line 22: }
Line 23:
Line 24: @Html.Telerik().DropDownList().Name("Category").BindTo(categoryList)

Source File: e:\NopCommerce\nopCommerce_2.65_Source\Presentation\Nop.Web\Plugins\SevenSpikes.Nop.Plugins.AnywhereSliders\Views\AnywhereSlidersAdmin\EditorTemplates\SliderCategory.cshtml    Line: 24

Stack Trace:


[InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.]
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +532373
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +66
   Telerik.Web.Mvc.UI.ClientSideObjectWriter.AppendCollection(String name, IEnumerable value) +100
   Telerik.Web.Mvc.UI.DropDownList.WriteInitializationScript(TextWriter writer) +230
   Telerik.Web.Mvc.UI.ViewComponentBase.WriteHtml(HtmlTextWriter writer) +655
   Telerik.Web.Mvc.UI.DropDownList.WriteHtml(HtmlTextWriter writer) +91
   Telerik.Web.Mvc.UI.ViewComponentBase.ToHtmlString() +81
   Telerik.Web.Mvc.UI.ViewComponentBuilderBase`2.ToHtmlString() +22
   Telerik.Web.Mvc.{Dynamic}.DropDownListBuilder.IHtmlString.ToHtmlString() +4
   System.Web.HttpUtility.HtmlEncode(Object value) +38
   System.Web.WebPages.WebPageBase.Write(Object value) +68
   ASP._Page_Plugins_SevenSpikes_Nop_Plugins_AnywhereSliders_Views_AnywhereSlidersAdmin_EditorTemplates_SliderCategory_cshtml.Execute() in e:\NopCommerce\nopCommerce_2.65_Source\Presentation\Nop.Web\Plugins\SevenSpikes.Nop.Plugins.AnywhereSliders\Views\AnywhereSlidersAdmin\EditorTemplates\SliderCategory.cshtml:24
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +222
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +579
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1002
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +66
   System.Web.Mvc.Html.TemplateHelpers.TemplateFor(HtmlHelper`1 html, Expression`1 expression, String templateName, String htmlFieldName, DataBoundControlMode mode, Object add
Boyko
10 years ago
#2823 Quote
Avatar
  • Moderator
  • 1570
dinhvanvo wrote:
I'm using Nop 2.65 and the Nop Anywhere Sliders plugin has been installed. But when I try to configure the slider(in Admin -> Plugins -> Nop Anywhere Sliders -> Manage Sliders), I get the following error when I hit the 'Save' or 'Save and Continue' and Edit button:

[code]
Server Error in '/' Application.

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



Hi dinhvanvo,

This error is thrown by the Telerik controls. I guess this is because you probably have too many categories and it couldn't populate the dropdown with the categories. Could you check if you can map a product to a category and see if you got this same error? How many categories do you have?

Thanks
Regards,
Nop-Templates.com Team
dinhvanvo
10 years ago
#2829 Quote
Avatar
  • 5
I have 75482 category. Exactly right you have too many categories but I can not remove. What should I do?
dinhvanvo
10 years ago
#2836 Quote
Avatar
  • 5
dinhvanvo wrote:
I have 75482 category. Exactly right you have too many categories but I can not remove. What should I do?

You are right. There is 75482 categories but they cannot removable. What should I do?
Sorry. My english is bad
IvanStoyanov
10 years ago
#2838 Quote
Avatar
  • Moderator
  • 269
dinhvanvo wrote:
I have 75482 category. Exactly right you have too many categories but I can not remove. What should I do?
You are right. There is 75482 categories but they cannot removable. What should I do?
Sorry. My english is bad


Hi dinhvanvo,

Please read the following post and apply the fix: http://www.nop-templates.com/boards/topic/407/error-on-filtering-parentcategory-with-products-from-subcategories#2072

Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
dinhvanvo
10 years ago
#2884 Quote
Avatar
  • 5
I have tried. But it does not work