BlogEngine.NET supports SQL Server as a blog provider in case you prefer to use it over the default XML provider. Setup is possible with release 1.0 of BlogEngine, but it is strongly recommended you upgrade to latest version.
Instructions for setup are now included in the Setup Folder of your BlogEngine web site. Open the SQLServer folder ad you should fine a readme.txt file with complete instructions for upgrading and initial setup.
EditInstructions for version 1.3.1 and prior
EditPreparing your SQL Server Database
Setup is still a little bit rough, but easy enough to do if you are familiar with Microsoft SQL Server. The first thing you need to do is to create the data structure. You can put the BlogEngine.NET tables in a new database or create them in an existing database.
The script to create the tables and initial values is included in the setup folder of the web project. You will need to run this script against the database you want to create the tables in. Once the script has completed, you should have 8 shiny happy tables ready to BlogEngine.NET. (There are just 6 in the 1.0.0.0 version.)
Now that you you have the tables setup and the initial values in place, you only need to think about security while you are here. (How will you connect to the database?) One method is to create a SQLUser and give it access.
EditSetting up BlogEngine.NET for SQL Server
There are two pieces changes that need to be made in BlogEngine.NET.
First, you need to open the web.config file in the root folder. Find the BlogEngine section:
<BlogEngine>
<blogProvider defaultProvider="XmlBlogProvider">
<providers>
<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>
</providers>
</blogProvider>
</BlogEngine>Now you need to change to tell BlogEngine.NET that the SQL Provider is the default. Make it look like this:
<BlogEngine>
<blogProvider defaultProvider="MSSQLBlogProvider">
<providers>
<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider"/>
</providers>
</blogProvider>
</BlogEngine>You will also need to add your connection string to the web.config. It is expected to be named BlogEngine.
<connectionStrings>
<add name="BlogEngine" connectionString="Data Source=MySQLServer;
User ID=user;Password=password;persist security info=False;
initial catalog=BlogEngine;" providerName="System.Data.SqlClient"/>
</connectionStrings>Note: In version 1.0, you needed to store the connection string in settings.xml. The settings are now a part of the BlogProvider and therefore stored in your database. There is no longer any need to keep the MSSQLConnectionString setting.
EditRunning it
That is it. That is all you need to do. Run it and start adding some data. (Your blog will look very empty as there will be no data to start with.)
If you have problems with it, please post on the
discussion board and someone should be able to answer your question.