Error
Source File: c:\Projects\WaterfrontSeattle.org\src\Orchard\Logging\OrchardLog4netLogger.cs
Line: 63
Source Error:
Line 61: // Load the log4net thread with additional properties if they are available
Line 62: protected internal void AddExtendedThreadInfo() {
Line 63: if (_shellSettings.Value != null) {
Line 64: ThreadContext.Properties["Tenant"] = _shellSettings.Value.Name;
Line 65: }
Research
From DuckDuckGoing, here is what we've learned, this type of error happens when we attempt to access a Lazy Value. Some Orchard Forum posts on Codeplex indicate that this means the module is out-of-date and that it needs an update to work. Some Orchard Gallery posts suggest clearing the Orchard cache as a fix. Neither of those were true for us.
Our Workaround
- Delete App_Data.
- Remove the module from all locations.
- Recreate Website.
- Restore the database.
- Install the module from Visual Studio's Package Manager.
Post-mortem
It seems that the most important part of the workaround was deleting App_Data. What was inside App_Data that lead to the error? We had previously tried deleting the cache.dat file without success. What else is there in App_Data that we could have deleted?
When troubleshooting Orchard errors, it helps to narrow down the error's location:
Delete the App_Data folder and reset/restore the Source Code and database to a time when things were working. If you can do these one at a time, that will help to isolate the error's location.
In our case, the problem was in App_Data.