Amazon.com Widgets April 2013

WilliaBlog.Net

I dream in code

About the author

Robert Williams is an internet application developer for the Salem Web Network.
E-mail me Send mail
Go Daddy Deal of the Week: 30% off your order at GoDaddy.com! Offer expires 11/6/12

Recent comments

Archive

Authors

Tags

Code Project Associate Logo

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.


Blog Engine Save Button not working on large post

I recently wrote a really long (about 20,000 words) blog post. I had been saving it periodically as I typed, but it suddenly reached a point where the Save button just didn't work anymore. Bringing up Firebug I could see that the Ajax request was being sent and a 500 sytem Error was being returned by the server. When I tried to insert a breakpoint in the method it was never being hit.

This made me think that this size limitation was probably in ASP.Net, not in the BlogEngine.Net codebase, and sure enough that is what it is. jQuery doesn't limit the size, but ASP.NET does by default.  You can adjust it with this web.config setting:

 

<system.web.extensions>
 
<scripting>
     
<webServices>
       
<jsonSerializationmaxJsonLength="x">
       
</jsonSerialization>
     
</webServices>
 
</scripting>
</system.web.extensions>


Where x is the size limit in bytes.

If you insert this section into your web.config and start seeing errors, you will need to install ASP.NET AJAX. Visit www.asp.net/ajax for more details.

 


Categories: Ajax | JavaScript
Posted by Williarob on Wednesday, April 10, 2013 9:32 AM
Permalink | Comments (0) | Post RSSRSS comment feed