This project is read-only.

Strange issue with BE 2.0 & SQL_CE

Dec 3, 2010 at 5:03 AM

I have a website with BE 2.0 RC and SQL_CE with about 300 users in the database, when I go online and login as admin and go to users there are no users visible, the page is blank, if I create a new user it does not show up, the page is still blank.  If I download the database to my computer, view the users table with WebMatrix all the users are there including the latest one I added online.  It works fine locally. all the users are there when the users page is viewed in my browser.  I have added most of the users locally and then uploaded to the server and everything was fine until the last upload, now there are no users visible when viewed on the server.  I can choose a users login info and login fine online so the data is still there, it is just not visible.

Any ideas?

Dec 3, 2010 at 8:33 AM

I have an idea.  On the Users page, we don't have Paging like we do on the Comments page.  So all 300 users are being retrieved and displayed at one time - rather than 10 or 20 users at a time if we had paging.  The data from the server comes in JSON format, and there's a default limit to how big the JSON size from the server can be.

Fortunately, this limit can be easily increased.  To do so requires modifying the web.config file.  Coincidentally, the area to modify is the same area you were having problems with last week here.  It's the <system.web.extensions> section in the web.config file that needs to be modified.  Hopefully you were able to go with solution # 1 from that thread.  We need to add a <system.web.extensions> section into the web.config file.  If you went with solution # 1, then that means you already have a <system.web.extensions> section in your web.config file.  Here's what the final <system.web.extensions> section should look like:

			<authenticationService enabled="true" requireSSL="false"/>
			<jsonSerialization maxJsonLength="2147483644"></jsonSerialization>

I added the <jsonSerialization> tag in there.

Although you already have it, for reference, here is the SQL CE 4.0 web.config file that comes with BE 2.0 RC.  It has the <system.web.extensions> section in there.

Not entirely sure if this is the solution to the problem, but seems likely.

Dec 3, 2010 at 11:54 AM

Thanks Ben, the above change took care of the issue.

Feb 21, 2011 at 6:05 AM

Thanks a lot Ben, it resolves the issue for me. I'm wondering if I can set this value from BlogEngine setting for the next release.

Much appreciated.

Feb 21, 2011 at 9:35 AM

I think this type of value can only be set via the web.config file ... rather than dynamically at runtime.  I could be wrong though.  If it could be set at runtime, then this "maxJsonLength" value could be controlled in the BE control panel.

It would be good if we either included the maxJsonLength value in the web.config file that is included with BE, or another solution would be for us to introduce paging on the Users page in the control panel.  So rather than having all 200 or 300+ users on the page at once, you might see 50 to 100 users at a time ... then advance to page 2, page 3, etc.  This would also solve the problem of having too much data come down from the server at once.

Feb 21, 2011 at 9:51 AM

Totally agreed to Ben's opinion. So, paging of user list is necessary for those who uses BE as a tool for online community (and BE is getting more and more popular).