Problem adding Pages when using MSSQL database.

Topics: Business Logic Layer, Controls
Nov 7, 2014 at 4:16 PM
I am using BE version 3.1.0.1 and MS SQL database (used MSSQLSetup3.0.0.0.sql to create database). Also used SQLServerWeb.Config as a baseline for web.config. Here's the changes in web.config that I made:
 <BlogEngine>
    <blogProvider defaultProvider="DbBlogProvider">
      <providers>
        <!--<add description="Xml Blog Provider" name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core" />-->
        <add connectionStringName="BlogEngine" description="Sql Database Provider" name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" />
      </providers>
    </blogProvider>
    <blogFileSystemProvider defaultProvider="DbBlogProvider">
      <providers>
        <!--<add description="Xml Blog Provider" name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlFileSystemProvider, BlogEngine.Core" />-->
        <add storageVariable="BlogEngine" description="Sql Database Provider" name="DbBlogProvider" type="BlogEngine.Core.Providers.DbFileSystemProvider, BlogEngine.Core" />
        <!--<add storageVariable="\\UNCPath\BlogFiles" description="UNC Path Provider" name="UNCBlogProvider" type="BlogEngine.Core.Providers.UNCFileSystemProvider, BlogEngine.Core"/>-->
      </providers>
    </blogFileSystemProvider>
  </BlogEngine>
  <connectionStrings>
    <clear />
    <add name="BlogEngine" connectionString="Data Source=xxxxx;Initial Catalog=Blog;User ID=xxxxx;Password=xxxxx;persist security info=False;" providerName="System.Data.SqlClient" />
    <!--<add name="BlogEngine" connectionString="Data Source=localhost;User ID=usernmae;Password=password;persist security info=False;initial catalog=BlogEngineFileStore;" providerName="System.Data.SqlClient"/>-->
  </connectionStrings>
After all these changes, I am having problems creating pages. Everything else even the File uploading process works OK.

Here's the screenshot
Image

Finally, on the admin pages, how do I see detailed error message. Any help would be greatly appreciated. Thanks in advance
May 27, 2015 at 1:03 AM
Did you ever get a resolution to this? I have the same issue..
Jun 22, 2015 at 3:45 AM
Edited Jun 22, 2015 at 3:45 AM
Did you try this one? http://zealgeeks.com/failed-adding-new-pagebe-31-version.aspx
There was a column missing in the database..
Oct 5, 2015 at 8:02 AM
I have the same Problem running BlogEngine.Net BlogEngine.NET 3.1.0.1

Unfortunately Addind the column did not work, since it is already there.
Is there another possible source for this issue?
Mar 30 at 7:13 AM
Edited Apr 12 at 2:51 PM
The post, I was looking for. Unfortunately, there isn't any resolution yet :(

EDIT: After looking the code and searching for any solution I found out that a new field: SortOrder has to be added to be_Pages table. There is one SQL Query, which I found in the Setup scripts and I ran it:
ALTER TABLE dbo.be_Pages ADD
    SortOrder int NOT NULL CONSTRAINT DF_be_Pages_SortOrder DEFAULT 0

CREATE NONCLUSTERED INDEX IX_be_Pages ON dbo.be_Pages
    (
    SortOrder
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
Run this and next time you try to add new page, hit the Settings button in the bottom of the page and fill all the fields there, especially the Sort Order one.

It worked for me, I hope it will work for you too