Repository navigation
Troubleshooting
| Where | What |
|---|---|
| Admin > Event Log | Errors and events of the running forum: exceptions, spam detections, banned users, mail errors, ... |
| IIS: stdout log | Errors during startup, before the forum can write to its database. Turned off by default, see below. |
Linux (systemd): journalctl -u yafnet |
Console output of the forum, including startup errors. See Hosting on Linux with nginx. |
Docker: docker compose logs yafnet |
Console output of the forum container. See Docker. |
-
Create a
logsfolder in the forum folder and give the application pool identity write access to it. -
In the
web.configof the forum, setstdoutLogEnabledtotrue:<aspNetCore processPath="dotnet" arguments=".\YAF.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
-
Open the forum again and look at the newest file in
logs.
Turn the log off again when you are done. It isn't rotated and grows without limit.
| Error | Cause and solution |
|---|---|
HTTP Error 500.19 (error code 0x8007000d) |
The ASP.NET Core Module is missing. Install the ASP.NET Core Hosting Bundle and restart IIS (iisreset). If you installed IIS after the Hosting Bundle, run the Hosting Bundle installer again (repair). |
| HTTP Error 500.31 - Failed to load ASP.NET Core runtime | The .NET 11 runtime is missing. Install the ASP.NET Core Hosting Bundle for .NET 11. |
| HTTP Error 500.30 - ASP.NET Core app failed to start | The forum crashed during startup, usually because of an invalid appsettings.json (e.g. a missing comma) or a wrong connection string. Turn on the stdout log to see the exception. |
| HTTP Error 502.5 - Process Failure | Same as 500.30 for the out-of-process hosting model. |
| HTTP Error 403.14 - Forbidden | The site doesn't point to the forum folder, or the ASP.NET Core Module isn't installed. |
See also Troubleshoot ASP.NET Core on IIS.
- Check
ConnectionStrings:DefaultConnectionand thatBoardConfiguration:ConnectionProviderNamematches your database, see BoardConfiguration Settings. - SQL Server: add
TrustServerCertificate=True;to the connection string if the server doesn't have a trusted certificate. The connection is encrypted by default. - SQL Server with
Integrated Security=Trueunder IIS: the forum connects as the application pool identity (e.g.IIS APPPOOL\YourAppPool). That login needs access to the database. - SQLite: the forum user needs write access to the database file and its folder.
ASP.NET Core can't store its data protection keys, so they are lost on every restart.
-
IIS: in the advanced settings of the application pool, set Load User Profile to
True. - Linux: the user the forum runs as needs a home folder, see Hosting on Linux with nginx.
- Docker: the keys are stored inside the container and are lost when it is recreated, e.g. after an update. Users have to log in again after updates.
The rate limiter blocked the requests. Either RateLimiterPermitLimit is too low (use at least 100), or all users share the address of a reverse proxy, see Reverse proxy and Cloudflare.
The forum runs behind a reverse proxy or CDN that isn't trusted, see Reverse proxy and Cloudflare.
The forum runs behind a proxy that handles HTTPS, see Reverse proxy and Cloudflare - HTTPS at the proxy.
- Check the
MailConfigurationsection inappsettings.json(Host,Port,UserName,Password). - Send a test email from Admin > Mail with Send Test.
- Errors when sending mails are written to the Event Log.
They use SignalR with WebSockets. The proxy has to forward the Upgrade and Connection headers, see the nginx configuration in Hosting on Linux with nginx. Under IIS, install the WebSocket Protocol feature.
Check the Max File Size in the host settings, and the upload limit of your proxy (nginx: client_max_body_size, default 1 MB).
For example:
Lock obtain timed out: SharingNativeFSLock@/var/www/yafnet/wwwroot/Search_Data/write.lock:
System.IO.IOException: Cannot create directory: /var/www/yafnet/wwwroot/Search_Data
---> System.UnauthorizedAccessException: Access to the path '/var/www/yafnet/wwwroot/Search_Data' is denied.
The forum user can't write to the forum folder. unzip applies the permissions stored in the zip file, which can be missing write access, and chown alone doesn't change them. Fix the owner and the permissions, then restart the forum:
sudo chown -R yafnet:yafnet /var/www/yafnet
sudo chmod -R u+rwX,go+rX,go-w /var/www/yafnet
sudo systemctl restart yafnetDo this after every update as well, see Hosting on Linux with nginx.
File names on Linux are case-sensitive. The folders must be named wwwroot/images and wwwroot/uploads.
Ask in the YAF.NET support forum. Include the YAF.NET version, the database, the hosting (IIS, Linux, Docker) and the error message from the logs.
YetAnotherForum.NET (YAF) the Open Source Discussion Forum for ASP.NET - https://YetAnotherForum.NET - Support me on Ko-fi
Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
Getting started
- About YAF.NET
- Features
- Docker
- Installation (IIS)
- Hosting on Linux with nginx
- Integration (ASP.NET Core)
- Upgrade to v4
Configuration
Administration
Help
Development
Legacy (v3 and older)