YAFNET.Umbraco.Forums 4.1.1

dotnet add package YAFNET.Umbraco.Forums --version 4.1.1
                    
NuGet\Install-Package YAFNET.Umbraco.Forums -Version 4.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YAFNET.Umbraco.Forums" Version="4.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YAFNET.Umbraco.Forums" Version="4.1.1" />
                    
Directory.Packages.props
<PackageReference Include="YAFNET.Umbraco.Forums" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YAFNET.Umbraco.Forums --version 4.1.1
                    
#r "nuget: YAFNET.Umbraco.Forums, 4.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YAFNET.Umbraco.Forums@4.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YAFNET.Umbraco.Forums&version=4.1.1
                    
Install as a Cake Addin
#tool nuget:?package=YAFNET.Umbraco.Forums&version=4.1.1
                    
Install as a Cake Tool

YAF.NET Forums for Umbraco

NuGet NuGet downloads Build Umbraco 18 YAF.NET 4.1.1 License Ko-fi

Runs the YAF.NET forum inside an Umbraco site at /Forums, with single sign-on through Umbraco Members: members log in once on the site and are logged in to the forum.

Version
Umbraco 18 (.NET 10) — built against 18.3.2
YAF.NET 4.1.1 (YAFNET.RazorPages + a data provider package)

How it works

  • YAF's Razor Class Library (YAFNET.RazorPages, area Forums) serves the forum pages under /Forums.
  • Login: the Umbraco member cookie is the only login. YAF finds the current user by User.Identity.Name, so a logged-in member is the forum user with the same username.
    • YAF's sign-in/sign-out (SignInManager<AspNetUsers>) is replaced by MemberBridgeSignInManager, which signs the matching member in/out. Logging out of the forum logs out of the site.
    • The first time a member opens the forum, the forum user is created automatically (AutoProvisionMembers).
    • YAF's login, register and password pages redirect to the Umbraco member pages (YafForums:*Url).
  • Isolation: YAF's UseYafCoreForArea runs YAF's middlewares (AntiXss, security headers, session, install check, ban checks, rate limiter, localization, ...) only for forum requests — matched by endpoint (any YAF controller, page or hub) — never for Umbraco content, backoffice or API requests. Registered through an UmbracoPipelineFilter, no changes to UseUmbraco() needed.
  • Identity: YAF's AddYafCore(..., useHostIdentity: true) adds no YAF login cookie and no YAF identity options; the plugin registers the identity services of the forum users with the member sign-in bridge.
  • Account management: the plugin sets YAF's BoardConfiguration:HostManagesAccounts, so the forum shows no account features of its own (login box, password change, two-factor, account deletion, user import, ...) — like YAF 3 did inside DotNetNuke. The forum also registers no service worker and no web manifest, so it does not take over the Umbraco site (no "install app"; the forum's push notifications still work).
  • Backoffice: a "Forums" dashboard in the Content section links to the forum and its administration.

Installation

  1. Add the packages (plus the YAF data provider you use):

    dotnet add package YAFNET.Umbraco.Forums
    dotnet add package YAFNET.Data.SqlServer   # or .Sqlite / .MySql / .PostgreSQL
    
  2. Program.cs — one line before builder.Build():

    builder.CreateUmbracoBuilder()
        .AddBackOffice()
        .AddWebsite()
        .AddComposers()
        .Build();
    
    builder.AddYafForums();   // YAF.NET under /Forums (switches the service provider to Autofac)
    
    WebApplication app = builder.Build();
    

    YAF requires Autofac as the service provider; AddYafForums() sets it up for the whole host.

  3. appsettings.json — the YAF connection string and settings, and the plugin options:

    "ConnectionStrings": {
      "DefaultConnection": "Server=...;Database=...;"   // the YAF database (can be the Umbraco database)
    },
    "YafForums": {
      "LoginUrl": "/login",          // the Umbraco member login page, empty = built-in page /forums-login
      "RegisterUrl": "/register",    // empty = LoginUrl
      "ForgotPasswordUrl": "",       // empty = LoginUrl
      "AutoProvisionMembers": true,
      "EnableBuiltInLoginPage": true
    },
    "BoardConfiguration": {
      "BoardID": 1,
      "ConnectionProviderName": "System.Data.SqlClient",
      "DatabaseObjectQualifier": "yaf_",   // prefix of the YAF tables, so they can live in the Umbraco database
      "DatabaseOwner": "dbo",
      "UseRateLimiter": true,
      "RateLimiterPermitLimit": 10
      // ... see https://github.com/YAFNET/YAFNET/wiki/BoardConfiguration-Settings
    },
    "MailConfiguration": { "Host": "localhost", "Port": 25 },
    "VapidConfiguration": { "PublicKey": "", "PrivateKey": "" }
    

    BoardConfiguration:Area is always set to Forums and BoardConfiguration:HostManagesAccounts to true by the plugin.

  4. Open /Forums and run the YAF install wizard. The superuser you create there becomes a forum admin when an Umbraco member with the same username logs in — create that member in the backoffice.

  5. Link the forum from your site: <a href="/Forums">Forum</a>.

The built-in login page

If YafForums:LoginUrl is empty, /forums-login is a minimal member login page, so the forum works right away. For a real site, point LoginUrl (and RegisterUrl) to your Umbraco member pages — they must redirect to the returnUrl query parameter after login. Set EnableBuiltInLoginPage to false to turn it off.

Sample site

samples/YAF.Umbraco.Forums.TestSite is an Umbraco 18 site with SQLite for Umbraco and YAF:

cd samples/YAF.Umbraco.Forums.TestSite
dotnet run

Umbraco installs unattended, and the sample members forumadmin and alice are created at startup. All sample credentials (backoffice admin, members) are in appsettings.Development.json — local test values only. Run the YAF install wizard at /Forums and use forumadmin as superuser name so that member is the forum admin.

Known limitations

  • YAF's static files are served from the site root (/css, /js, /assets, /languages, ...) and its API controllers use root routes (/api/..., /Posts, /Poll, ...). Avoid site files/routes with the same names.
  • Accounts are managed by Umbraco Members (BoardConfiguration:HostManagesAccounts, YAF 4.1.0+): the forum's login links go to the member login page, and YAF's login box, password recovery and change, two-factor authentication, email change, account deletion and the admin's user creation/import are hidden and blocked. Changing a member's username creates a new forum user.
  • Password rules (IdentityOptions) are shared with Umbraco Members; YAF's password settings are not applied.
  • The forum pages use YAF's own layout. To use the site's header/footer, override Areas/Forums/Pages/Shared/_Layout.cshtml in the site (Razor Class Library views can be overridden).
  • YAF's language switcher lists the site's request cultures, not YAF's languages (YAF's cultures are only applied inside the forum, so they don't change Umbraco's culture handling).

Workarounds for YAF 4.1.1 (candidates for upstream fixes)

  • In area mode the RCL ships images below /Forums/images, but YAF links /images/... (e.g. the board logo) — missing /images/* files are served from /Forums/images.
  • LoadPageFromDatabase shows an identity without a forum user as guest (GetPageLoad falls back to the guest user), so its "create the forum user" branch is never reached — the plugin creates the forum user itself (like ImportForumUser).
  • AddYafCore sets YAF's languages as the request cultures of the whole application, the plugin removes that registration again (UseYafCoreForArea uses YAF's languages for the forum requests only).
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.1.1 101 11/30/2026
4.0.11-alpha2 98 11/15/2026
4.0.11-alpha1 94 11/15/2026