In some situations, users of DNN Evoq version 9.1.1 might encounter a critical error message when accessing their site. Critical error messages may also be present when viewing the content visualizers.
- Access to a Superuser account.
- (In step 3) Access to site root directory and files
- (In step 3) Access to SQL server
Diagnosis - Please check the DNN log files to look for the following:
|System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.List`1.Contains(T item) at DotNetNuke.Entities.Urls.CustomUrlDictController.FetchCustomUrlDictionary(Int32 portalId, Boolean forceRebuild, Boolean bypassCache, FriendlyUrlSettings settings, SharedDictionary`2& customAliasForTabs, Guid parentTraceId)|
Solution steps -
There are three possible fixes to this error which should be attempted in order. If the first doesn't fix it, the second should be tried, etc. Each subsequent fix is more technically demanding and works with more fundamental site data, and so has additional precautions that should be taken. Be sure to test after each fix.
The fixes, in order, are:
- Clearing the server cache. After clearing the cache, the dictionary in the memory will be updated.
- Content reindexing
- Full search reindexing
Please note that there is no set timeframe that you should perform these steps, and performing the steps frequently will not work as a preventative measure either.
The issue occurs due to one of the lists used in the UrlPortals cache not being thread safe. This means that multiple threads are able to add and remove items from the list at the same time which can lead to the list size being stored incorrectly and create the problem you were seeing.
As it's entirely dependent on whether or not multiple threads access the list at the same time in such a way to create the issue, it's not possible to say exactly when or how often it will occur. The more traffic you have to your site, the more the cache will be accessed making the issue more likely but it is still down to chance.
Once the cache becomes broken like this, you will continue seeing issues until you take the steps mentioned above.
This error might reoccur since it is a reported bug in Evoq 9.1.1. To permanently resolve this issue, upgrade your environment to Evoq 9.2 or later, which is documented in the defect ticket: DNN-10596.
Browsing to the page in question should no longer result in a critical error. Browser cache may need to be cleared or a hard refresh performed.