Skip to content
Ingo edited this page Jan 10, 2026 · 8 revisions

Upgrade from YAF 3.2.11 (or earlier) to YAF.NET v4.0.4

Warning

If you want to Run the YAF ASP.NET Core application under IIS the ASP.NET Core Module/Hosting Bundle needs to be installed.

STEP 1. BACKUP

  1. BACKUP YOUR DATABASE
  2. Backup all your existing installation YAF files

STEP 2. REMOVE

  1. Remove the following directories from your forum root directory:
  • _\App_Browsers:
  • \Bin
  • \Content
  • \Controls
  • \Dialogs
  • \Install
  • \languages
  • \Pages
  • \Resources
  • \default.aspx
  • \error.aspx
  • \Global.aspx
  • \UrlRewriter.aspx

STEP 3. UNZIP

  1. Unzip the file structure YAF-vX.X.X-Install ZIP archive to the folder you want to run YAF to run inside.

STEP 4. Move the uploads & Images folder to wwwroot

  1. Copy the Images and uploads folder to the wwwroot folder

STEP 5. Migrate the Web.config to the appsettings.json file

The connection string, mail configuration and membership provider settings need to be migrated from the web.config to the appsettings.json file

  1. So the connection string from the web.config
<add name="yafnet" connectionString="data source=localhost;initial catalog=yafnet;Integrated Security=True" providerName="System.Data.SqlClient" />

will be

{
  "ConnectionStrings": {
    "DefaultConnection": "data source=localhost;initial catalog=yafnet;Integrated Security=True;TrustServerCertificate=True;"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "MailConfiguration": {
    "Mail": "",
    "Password": "",
    "Host": "localhost",
    "Port": 25
  },
  "BoardConfiguration": {
    "GDPRControllerAddress": "",
    "BoardID": 1,
    "CategoryID": 0,
    "ConnectionProviderName": "Microsoft.Data.SqlClient",
    "DatabaseObjectQualifier": "yaf_",
    "DatabaseOwner": "dbo",
    "MultiBoardFolders": false,
    "AllowLoginAndLogoff": true,
    "SqlCommandTimeout": 99999,
    "URLRewritingMode": "Unicode",
    "UseHttpsRedirection": true
  },
  "AllowedHosts": "*"
}
  1. the Settings from the mailSettings/Smtp are now under MailConfiguration in the appsettings.json
  2. And the appSettings are now under BoardConfiguration

STEP 6. Auto UPGRADE

  1. When the Application runs after the files are copied to the server, then the Database will be updated automatically.

Clone this wiki locally