Increase post character

Topics: Controls
Oct 28, 2011 at 12:30 AM

Hi,

I am trying to increase the character limit to my blog posts, and it's probably really to find but it doesn't seem to be controlled by Add_entry, or any other file I've looked into... I think the current limit is at 8,000 char and unless there is known problem with longer lengths I'd like to double that.

Any help will be appreciated,

Thanks!

*TOMA

Oct 28, 2011 at 12:22 PM

Are you saying that you can't make a post over 8,000 characters? I don't think that there's a limit to how many characters a post can have. I just tested making a post with over 71,000 characters.

Oct 28, 2011 at 1:26 PM

Indeed. I used to be able to in previous versions of the script, but I haven't been able to do it since I moved to 2.0.

Though what I meant to say 58,000 characters, not 8,000 - when I try to post messages over the limit, I don't even get an error message, it just doesn't post. 

Oct 29, 2011 at 1:47 AM

Are you using a SQL or MySQL database or XML?

Oct 31, 2011 at 4:29 AM

It's a SQL database, on a MS SQL server.

Nov 10, 2011 at 3:13 PM

Little update following the last comment: I've mirrored my install with an XML backend, and I still can't post over that 58,000 character limit.

Version info so everyone's on the same page, I'm running 2.0.0.36, the server is running .NET 3.5. 

Nov 10, 2011 at 5:15 PM
tomatomatoma wrote:

Little update following the last comment: I've mirrored my install with an XML backend, and I still can't post over that 58,000 character limit.

Version info so everyone's on the same page, I'm running 2.0.0.36, the server is running .NET 3.5. 

I have been doing some testing to see if there is a character limit. My test system is BE 2.5.0.6 (XML) running on my local PC which is Windows 7 64bit (IIS 7) and .NET 4 installed and I'm using IE9 as the browser. I have determined that the maximum number of characters that I can enter is 100,769. The post saves just fine using that many characters. However, if I add just one more character, be it a space, comma, period, anything, it won't save. So that makes me wonder if it's server or maybe local machine/browser specific as to why there's a limit because in theory there shouldn't be one.

Nov 10, 2011 at 8:35 PM
MGD_King wrote:
tomatomatoma wrote:

Little update following the last comment: I've mirrored my install with an XML backend, and I still can't post over that 58,000 character limit.

Version info so everyone's on the same page, I'm running 2.0.0.36, the server is running .NET 3.5. 

I have been doing some testing to see if there is a character limit. My test system is BE 2.5.0.6 (XML) running on my local PC which is Windows 7 64bit (IIS 7) and .NET 4 installed and I'm using IE9 as the browser. I have determined that the maximum number of characters that I can enter is 100,769. The post saves just fine using that many characters. However, if I add just one more character, be it a space, comma, period, anything, it won't save. So that makes me wonder if it's server or maybe local machine/browser specific as to why there's a limit because in theory there shouldn't be one.


Thank you for your input, MGD_King, you have just inspired me to do some tests myself.

I just attempted using IE9 and sure enough, I was able to enter a post that was 102,153 characters long. Also I noticed that adding a space in Chrome (15.0.814) adds 6 characters to the count - adding 2 spaces adds 6 characters in IE9 in Firefox. Additionally, the amount of text entered as a post title aslo affects this data limit.

So here is what I did:

I entered a continuous string of characters "wordwordwordword...", with the same amount of text as a title in each browser, using rich text editor in each (some browsers added unwanted paragraph breaks), using the character count in Blogengine here's the max amount I could post:

IE 101,802

Firefox 101,368

Chrome 101,362

Entering separate words "word word word word..."

IE 102,153

Firefox 102,146

Chrome 102,171

FUN! So I'm guessing the limit is a bytesize more so than a character limit. Which would explain why this limit is much higher than my original 58,000 count (those posts included heavy formatting) unless my host - who have been claiming they cannot do anything about the issue - actually changed some of their settings.

 

Nov 10, 2011 at 9:20 PM

I know you got the limit increased to probably more than what you would ever need but I had a thought about the web.config file placing limitations on message size.

I remember creating a web service a long time ago and there were default limits to how much could be uploaded (65536 (bytes?) is the default max message size). The limit could be increased in the web.config file and I wonder if the post size limitation could be caused by a similar limitation. I just did a little research and it seems you can set the max message size for asp.net using system.web.httpRuntime.maxRequestLength in the web.config. This setting is also present in my blogengine web.config (I didn't put it there) and is set for 16384.

Theres more info at

http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx

Nov 10, 2011 at 9:26 PM

That is actually one of the first settings that I altered when I encountered the error, but at first it didn't seem to have caused any changes. Maybe it takes a while for the change to propagate to the server. More experiments! Thank you jpcr.

Nov 10, 2011 at 9:27 PM
tomatomatoma wrote:

That is actually one of the first settings that I altered when I encountered the error, but at first it didn't seem to have caused any changes. Maybe it takes a while for the change to propagate to the server. More experiments! Thank you jpcr.


I would think that all it would need is an the app to reset like when you change the theme. Maybe do an IIS reset to force it.

Nov 15, 2011 at 10:15 PM
Edited Nov 15, 2011 at 11:57 PM

We are using an external host, I can't reset IIS... This is all bumming me out.

The advanced/settings.aspx.cs file contains a call for RemoteMaxFileSize, which only appears in BlogEngine.Core.xml...

Sez the limit is 512k and I can't see how I could get to that filesize with just text (even with adding the title, description, slug,  tags and whatnot). But could that be the setting? And if it is... Am I basically screwed?

Coordinator
Nov 16, 2011 at 5:25 AM
Edited Nov 16, 2011 at 5:35 AM

You running into this same issue with JSON serialization. You need to modify web.config to allow larger file serialization limit as described in that thread.

I changed from

<webServices>
        <authenticationService enabled="true" requireSSL="false"/>
</webServices>

to

<webServices>
        <authenticationService enabled="true" requireSSL="false"/>
	<jsonSerialization maxJsonLength="900000000"></jsonSerialization>
</webServices>
on my test blog and was able to save post with over 200,000 characters just fine.

Nov 16, 2011 at 1:51 PM
rtur wrote:

You running into this same issue with JSON serialization. You need to modify web.config to allow larger file serialization limit as described in that thread.

I changed from

 

<webServices>
        <authenticationService enabled="true" requireSSL="false"/>
</webServices>

 

to

 

<webServices>
        <authenticationService enabled="true" requireSSL="false"/>
	<jsonSerialization maxJsonLength="900000000"></jsonSerialization>
</webServices>
on my test blog and was able to save post with over 200,000 characters just fine.

 

I have confirmed with 36,401 words and 220,848 characters that this works just fine. However, performance in the editor takes a hit.

Nov 16, 2011 at 8:15 PM

Editor performance didn't take too much of a hit for me... I can always just modify the Web.Config file when I need to enter a longer post.

Anyway, it worked!! Thanks for the assistance all.