Error during serialization or deserialization using the JSON JavaScriptSerializer.

Topics: User Forum
Apr 17, 2012 at 6:45 PM

Right after trying he new vs2010 style, Im getting the following error message:

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

Is there anywhere where I can find more exception details, like the stack trace in order to provide more info?

(I trying the build now after switching back to vs2005 style, to see if this remedies the problem.)

Coordinator
Apr 17, 2012 at 7:32 PM

The seralizer is used to create the full-text index for the website.  From what I can tell, the default is 2MB so perhaps one of the keyword index files is exceeding that.  Is your project very large?  Can you perhaps e-mail me an example that fails?  Most likely, it's just a matter of setting the value higher but I'd be guessing without an example although I could just set it to the maximum I suppose.  My e-mail address is in the About box in the GUI and in the footer of the pages in the help file.

Eric

 

Apr 17, 2012 at 11:12 PM

The project I'm documenting is closed source so I cannot send you the binaries.

The project is quite large too, it runs for almost three hours on my SSD-equipped machine.

The issue persists, even though I swittched back to vs2005. Can you tell me what you would like to have?

Coordinator
Apr 18, 2012 at 2:20 AM

No problem.  I'll just set it to the maximum value or something a bit lower if it doesn't like that and publish a refresh that you can test.  Do you have an urgent need for this or would an update by Monday be acceptable?

Eric

 

Apr 18, 2012 at 7:43 AM

No urgent need here whatsoever, take your time.

Thanks again for your prompt reply.

Robert

Apr 19, 2012 at 10:53 AM

Eric,

I'm suffering with the same issue on quite a large project as well so an update (or workaround I can apply locally) would be much appreciated.

Thanks in advance,

Mike.

Coordinator
Apr 19, 2012 at 7:17 PM

I'll have a refresh published by Monday.  If you need it sooner, you can download the source, patch it, and build it.  I haven't fixed or tested it yet but it should be just a matter of setting the MaxJsonLength property on the JavaScriptSerializer instance created in SandcastleBuilderUtils\BuildEngine\FullTextIndex.cs in the SaveIndex() method and in SandcastleBuilderGUI\Web\SearchHelp.aspx in the Render() method.  I'd set it to Int32.MaxValue as that should effectively set no limit.

Eric

 

Apr 20, 2012 at 3:05 PM

Eric,

FYI, I got the source and applied the changes you suggested above and that allowed my project to build and be used without error.

Thanks,

Mike.

Apr 24, 2012 at 4:18 PM

I just encountered the same issue, will this be patched soon?

Coordinator
Apr 24, 2012 at 7:13 PM

I didn't have time to get to it this past weekend.  It'll be done this coming weekend.  If you need it sooner, you can patch the source as noted above.

Eric

 

May 10, 2012 at 7:51 AM

Any chance of releasing a build with this fix?

I'm having issues building from source (although it earned me the 'Suspicious' and 'Go to hell' VS Achievements badge). : SandcastleBuilderPackage won't load because 'it is not supported by this installation'.

Robert

May 10, 2012 at 2:04 PM

I second the previous post.
It seems that the fix has been implemented however I am still having the same problem with our large code-base. 
Any help please? 

Jennifer 

Coordinator
May 10, 2012 at 3:20 PM

Did you download the refresh published on 4/29?  You do need to manually uninstall SHFB first before rerunning the install.  The VSPackage should be reinstalled too but you shouldn't have to manually uninstall it first.

Eric

 

May 10, 2012 at 3:49 PM
Edited May 10, 2012 at 4:52 PM

I thought I did, I'll try again

...it's running right now, and so far it's doing well.

..and it keeps running, guess this is solved and I was stupid enough not to uninstall before reinstalling.

Thank you for your time!