Sueetie Blog DIFF Source and Setup Documentation Online

by Dave Burke 3. January 2009 17:50

BlogEngine.NET and Sueetie Integration Overview

BlogEngine.NET is a pleasure to use and has many configuration options making its integration with Sueetie a simple matter, though with a few setup steps as listed below. In an Online Community environment we would want to support several blogs, which is not currently supported in BlogEngine.NET natively. The approach we're taking with Sueetie to support multiple blogs is to store user data in SQL Server to leverage Sueetie's ASPNET Membership support and all blog content in XML format in that blog’s /app_data folder. All blogs share the 3 BE SQL tables, which we will detail below.

Download BlogEngine.NET 1.4.5 Source and compile the BE.NET 1.4.5 source for .NET 3.5 Framework

BlogEngine.NET is available on CodePlex.

Download the BLOG DIFF files from Sueetie CodePlex site

BLOG DIFF source is available at the Sueetie CodePlex site in both ZIP and versioned source.

Add WSAT and "Root Web" Web Site Projects to Solution

Add the WSAT Membership Administration and Root Web projects to the BlogEngine.NET solution. These are not currently referenced by BlogEngine.NET (or any Sueetie application), but will be involved in integration steps to follow.

Download Sueetie Core Source (ZIP or library) from CodePlex. Add Sueetie Core project to solution

This is the first appearance of the Sueetie.Core project, though its use is currently limited to performing one or two simple utility functions. Compile Sueetie.Core and add a reference in BlogEngine.Web project. The final BlogEngine.NET Visual Studio Solution will look like the following.


BlogEngine.NET Solution

Create BE.NET User Data in SQL Server

Update the "BlogEngine" connection string in web.config so we can proceed with creating the SQL User data objects. We will not be executing any SQL scripts that are located in the BE.NET/Setup area supplied with BlogEngine.NET. Recall that we will be storing user data in SQL Server and all blog content in /app_data in XML format to support multiple blogs. The schema to support this shared BlogEngine.NET/Sueetie User configuration is very simple as you can see below.


 

The Sueetie BLOG DIFFs include two SQL Scripts:

  1. /setup/SQLServer/SueetieSetup1.4.5.sql creates the role and user tables.
  2. /setup/SQLServer/SueetieAddUser.sql is supplied separately to give the default Sueetie "testguy" blog editor permissions to demonstrate how non-BlogAdministrators can share authorship in a blog.

All ASPNET site users in a community must have a record in be_user. Consequently you will need to execute SueetieAddUser.sql to add any users to be_user table beyond the default "admin" and "testguy" users during setup to avoid a BE.NET runtime error. User records will be created during the Sueetie Registration process, so to add support for BlogEngine.NET uncomment the Sql-to-LINQ code in /WSAT/Register.aspx.cs that creates a user record in be_user for all new ASPNET site accounts. Since /WSAT (like /Web and BlogEngine.NET /Blog) is a Web Site Project, no recompile is required.

Sueetie Blog Roles

Two Sueetie ASPNET Roles support the first, default instance of BlogEngine.NET. They are "BlogAdministrator" and "SiteBlogEditor." BlogAdministrator has full rights while the SiteBlogEditor has the Editor capabilities built-in with BlogEngine.NET. For multiple blogs on a Sueetie Community, each blog (or blog group) would require a unique role to designate Blog Editor status. BlogAdministrator role has global blog permissions. An example would be Sueetie.org, where two blogs are supported: the Site Blog and "Sueets." Two different users have Editor permissions on each blog, with a "SueetsBlogEditor" role assigned to the Editor of the Sueets blog.

Setup IIS for BlogEngine.NET

Create /blog virtual directory (if in development) or /blog application directory on Production Server. Give the IIS identity user read-write permissions to /App_Data folder where all content will be saved in XML for that blog.

One small final web.config tweak

Modify Sueetie.VirtualPath AppSettings Key in web.config to indicate virtual path to /Blog. Typically this would be "/" in production for http://mysite.com/blog. On my laptop for development purposes, url is http://nordic/gummybear/blog, so Sueetie.VirtualPath would be "gummybear."

BlogEngine.NET final touches

On your BlogEngine.NET sidebar, login with the "admin" account or user in the BlogAdministrator role and remove the Administration widget fhown here.


Sidebar Admin Widget to be removed


Otherwise all ASPNET users visiting blog will see an Administrative Widget with a single "Change Password" link. Because of the ASPNET Membership integration with Sueetie and BE.NET, blog editors have a link to the Blog's Administration area in the header links.


Blog Editor Blog Administration Link

Tags: ,

BlogEngine.NET

Comments are closed