Skip to content

6. DasBlog architecture

Mark Downie edited this page May 8, 2026 · 7 revisions

One of the primary goals of this project is to preserve the essence of the original DasBlog Blogging Engine while taking advantage of the modern cross platform goodness of ASP.NET Core.

DasBlog Core currently targets .NET 10 and the folder structure of the site remains consistent with DasBlog classic consisting of Content, Config and Themes folders.

Solution structure

The solution is organized into layered projects:

Project Role
DasBlog.Web ASP.NET Core web application, entry point (Program.cs), controllers, tag helpers, views
DasBlog.Services Core services: configuration, scheduling (Coravel), RSS/Atom, site management, ActivityPub
DasBlog.Managers Business logic: BlogManager, CommentManager, ThemeManager, CategoryManager, SearchManager, etc.
DasBlog.Core Shared types, extensions, security models, configuration enums
newtelligence.DasBlog.Runtime Legacy data access layer: IBlogDataService, Entry/Comment models, XML serialization

Dependency flow: DasBlog.WebDasBlog.Services / DasBlog.Managersnewtelligence.DasBlog.Runtime

"Content" folder

The Content folder contains all the files necessary for your blog posts. Blog data is stored as XML files via IBlogDataService, with the file name format 2019-08-15.dayentry.xml. Each file contains serialized Entry objects including post content, metadata, and associated comments. Images uploaded during post creation and editing are stored in a binary sub folder.

Activity logs are written to a separate Logs folder via ILoggingDataService.

The Content folder structure is compatible with the original dasBlog Engine and any files can be directly copied in place.

"Config" folder

The original dasBlog Engine had three configuration files and we have emulated the essence, however, they may not be fully compatible.

  • site.{Environment}.config
  • meta.{Environment}.config
  • siteSecurity.{Environment}.config

For convenience during deployment files are named based on the environment, for example, for a "Production" environment dasBlog core looks for "site.Production.config".

We have also added a configuration file designed to redirect from old dasblog URLs (.aspx), so if you are coming from old dasBlog URLs you automatically get redirected (HTTP 301) to the new URL format.

  • IISUrlRewrite.{Environment}.config

Configuration priority

Configuration sources are loaded in the following order (later sources override earlier ones):

  1. Config/site.config (required) then Config/site.{Environment}.config (optional)
  2. Config/meta.config (required) then Config/meta.{Environment}.config (optional)
  3. appsettings.json (required) then appsettings.{Environment}.json (optional)
  4. Config/oembed-providers.json (optional)
  5. Environment variables

"Themes" folder

Sub folders in the Themes folder each represents the name and the content of a theme. The default distribution of dasBlog core comes with built-in themes (darkly, dasblog, flamingo, kindofblue, median) but you can always add more. To switch themes navigate to /admin/themes and click Set as Active on the theme you want to use.

Additional information on how to create and configure themes can be found here.

Theme editor

The admin panel includes a theme editor at /admin/themes with the following capabilities:

  • View and edit theme files (.cshtml, .css, .js, etc.) with CodeMirror syntax highlighting
  • Versioned backups are created automatically when saving, with a 3-backup retention limit
  • Revert to a previous backup version
  • Create new custom themes from any existing theme as a template
  • Built-in themes are read-only and cannot be modified directly; create a custom copy first

Theme files are validated server-side before saving via IThemeContentValidator.

Authentication

DasBlog Core uses ASP.NET Core Identity with cookie-based authentication:

  • Login at /account/login with sliding expiration cookies
  • Custom DasBlogPasswordHasher bridges the legacy password format
  • Role-based authorization controls admin access (edit posts, manage comments, site settings)
  • Tag helpers like dasblog-authorized and dasblog-unauthorized control visibility of UI elements based on auth state (details here)

Additional questions?

If you have additional questions or concerns please submit an issue.

Clone this wiki locally