I recently worked on a case where SharePoint sites would not load after rebuilding the SharePoint Farm and utilizing an existing server. I’m blogging this issue is because the root cause and solution was very obscure, and the error presented on the site is totally misleading. If you came here because you are experiencing this error, I hope this blog helps you resolve the issue.
Unable to load SharePoint site with the following error.
An unexpected error has occurred.
Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
This error has nothing to with Web Parts, if you look at the unexpected error from ULS, you will find the following stack trace.
08/07/2019 14:05:15.46 w3wp.exe (0x0ED4) 0x0FCC SharePoint Foundation Runtime tkau
System.InvalidOperationException: Stand-alone provisioning has failed because an error occurred while enumerating the SharePoint Server products installed on this server.
at Microsoft.Office.Server.EvaluatorModeProvisioning.OfficeServerProducts.IsInstalled(OfficeServerProductToProvision product)
at Microsoft.SharePoint.Portal.WebControls.SearchBoxEx.OnPreRender(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at Microsoft.SharePoint.WebPartPages.WebPart.OnPreRender(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
This error is simply stating that SharePoint is in the process of reading what products are installed and if they are properly licensed. However, the process of reading these products from the registry failing, which is causing the site load failure and not a misconfigured or improperly installed product.
So what does the get_OfficeProductList() function actually do?
Simply put, it reads installed products from the registry via key “HKEY_CLASSES_ROOT\Installer\Products” to verify the product version and license. If it fails to read a key during the enumeration, the web page will fail to load with the error discussed above.
Open the last line in PROCMON and you will be able to copy the name of the key into your clipboard.
Now search the registry for this key. Notice it contains a “-old” at the end of key. The “-old” means a product may have been reinstalled on the same server. If you find this key is duplicated, with a different product key that does not contain a “-old”, it’s safe to delete the key.
Please Note: ALWAYS make a backup of the registry before making any changes.
Now that I deleted the key, I continued to use PROCMON while loading the site to see if other keys are causing this issue.
I repeated this process until all problematic keys were deleted.
This problem was resolved by deleting the duplicate product registry keys that contained a “-old” in the of the product GUID key within “HKCU\Software\Microsoft\Installer\Products”.
Once all duplicate product keys registry were deleted from “HKCU\Software\Microsoft\Installer\Products” the Sharepoint site loaded without error.
The main cause in this case was the presence of the “-old” in the key name. The function to read the registry was failing to read keys that contain the ‘-‘ in the name. However, deleting the key may not be the best option if the product is not duplicated, so please ensure that there is another key with the same GUID that does not contain the “-old” before deleting the key.
I hope you find this blog useful but be very careful when modifying the Windows Registry. If you are not comfortable with performing this action or do not fully understand what is needed, please contact Microsoft support and reference this blog.