I've come across an odd scenario and I'm drawing a blank. Perhaps one of my peers here will have an idea.
We have a custom navigation solution which consumes and builds on the OOTB navigation provider. This is deployed through two features. The first is a web application feature, which adds the custom sitemap provider to the providers node of the web.config. The second is a web scoped feature which activates the custom navigation on that specific web.
We deployed the solution through our Dev and QA environments, and everything worked normally, no issues on activation, no issues on configuration.
When we promoted it through to Production, it blew up. We're seeing an error in the ULS saying it can't find the custom sitemap provider.
We've validated that the web.config entries are present on all servers, manually confirmed that the DLL's had been deployed by the solution, confirmed web application user policies, etc, and confirmed all of the SQL permissions to the content database; everything matches the configuration of Dev and QA. Permissions are a one-for-one match, and we used a DB attach to migrate the environment from QA to Production, so everything in the content database matches QA.
We've also tried deactivating and retracting the solution, and trying it all over again. Additionally, we brought the troubled production environment's content database back to the dev environment, and everything works, so it's definitely an environmental issue with production, but we've been unable to isolate where the fault is.
System.Web.HttpExecution: The SiteMapProvider 'CustomNavigationProvider' cannot be found.
We're also seeing:
Detected use of SPRequest for previously closed SPWeb object. Which seems to be calling
Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren. Publishing is activated on all of the webs, configuration is the same as in Dev and QA. Errors do not show in Dev or QA.