I have an intermittent issue with Yet Another Forum.NET where the forums just go down. It's usually at least a week between occurrences, usually more. The last for the site happened 30th April, then just again 29th May (quite a big gap this time, maybe due to me proactively restarting the website in order to avoid occurrences while I'm away and offline and so unable to fix the issue immediately). The issue always goes away when the website is restarted.
I'm running YAF 1.9.6.1 and the error I get is:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Thread was being aborted.
Source Error:
Line 157: <providers>
Line 158: <clear />
Line 159: <add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider" />
Line 160: </providers>
Line 161: </membership>
Source File: D:\Inetpub\ftproot\MW\paydirt\www.paydirt.co.nz\web.config Line: 159
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
In case it has any bearing...
I'd be grateful to hear any advice / ideas about what might be causing this as it's been going on for quite some time now. The forums have a nasty habit of mainly going down when I'm away for a weekend and offline.
Thanks in advance for any help, Gavin
The issue was YAF.NET's global use of the HttpApplication for holding connection strings. In retrospect, HttpApplication is poor place to store singleton instances of configuration data. Occasionally, there were collisions and failures.
The fixes committed: https://github.com/YAFNET/YAFNET/commit/163e0c016087d4c2b8b625d807ce0b1eaa417195
Use a global ConcurrentDictionary instead of HttpApplication for storing the connection strings for the membership providers.