I recently had a serious issue with a SharePoint 2016 farm. Any site with Publishing enabled would fail to display giving a correlation error.
UPDATE: This issue is definitely related to Token Timeout settings. It was pretty common to adjust these settings in older SharePoint versions, but SharePoint 2016 doesn’t behave the same. See comments for more details.
Application error when access /Pages/Home.aspx, Error=The added or subtracted value results in an un-representable DateTime. Parameter name: value atSystem.DateTime.AddTicks(Int64 value) at Microsoft.SharePoint.Publishing.CacheManager.HasTimedOut() at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization, Boolean refreshIfNoContext) at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ComputeRedirectionVirtualPath(TemplateRedirectionPage basePage) at Microsoft.SharePoint.Publishing.Internal.CmsVirtualPathProvider.CombineVirtualPaths(String basePath, String relativePath) at System.Web.Hosting.VirtualPathProvider.CombineVirtualPaths(VirtualPath basePath, VirtualPath relativePath)
I tested creating a new web application and site collection using the Team Site template. This worked successfully. I tried again using a Publishing Site template and the error above appeared.
The issue appeared to be timezone related and so we checked the timezone and locale settings on all servers in the farm and the site collections to make sure they matched.
The ULS log also pointed us towards the Security Token Service and then the TokenTimeOut setting. Bingo! The SharePoint 2016 farm was using Mini-roles and the server host the Security Token Service had failed to pickup the configuration update with the timezone settings and so didn’t match the rest of the farm.
To resolve the issue we did the following:
- Ran a PowerShell command to update the TokenTimeOut to 24 hours
- Cleared the SharePoint Configuration Cache on each server in the farm
- Restarted all servers
Initially we had installed the farm with United States timezone, when a change was made to use New Zealand time, the configuration didn’t fully update on all servers and the Security Token Service was responding with US Date format making things very unhappy.
Publishing pages use the Security Token Service to validate pages. If the validation fails the page doesn’t load. Team sites without Publishing enabled are OK as they don’t do this validation.