Share via


'System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

Issue details

Unable to create a site collection using the custom template in the central administration site. But able to create the site collection using the OOB template.

Following error gets in the event viewer.

Event ID: 4965

Task Category: Publishing Provisioning

Source: Office SharePoint Server

Event log message was: 'Failed to initialize some site properties for Web at Url: '< https://sharepoint/en-us' >'. Exception was: 'System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)

at Microsoft.SharePoint.SPWeb.EnsureUser(String loginName)

at Microsoft.SharePoint.Publishing.CacheManager.<.ctor>b__0()

at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)

at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()

at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)

at Microsoft.SharePoint.Publishing.CacheManager..ctor(SPSite site)

at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite)

at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site)

at Microsoft.SharePoint.Publishing.PublishingWeb.get_PagesListId()

at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.InitializePublishingWebDefaults()'

RESOLUTION:

I managed to resolve the issue by entering the correct SharePoint farm account in the central admin application pool.

We can also resolve this issue by re - syncing the SharePoint farm account using this KB ' 934838 ' article also. If you are not sure where we have changed the farm account manually in SharePoint services.

Search Keyword

MOSS 2007, 'System.UnauthorizedAccessException:'