I am getting this error:
List does not exist
The page you selected contains a list that does not exist. It may have been deleted by another user. at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback…
Unfortunately it’s not the unpublished masterpage manifestation of the error – the list GUID in the query string leads to one of several lists in the root web that are used to display user settings in controls on the master page.
The list is being accessed using the following code:
_RootWeb = SPContext.Current.Site.RootWeb;
storageList = _RootWeb.GetList(_RootWeb.Url + "/Lists/" +
LocalStrings.TimeZoneStorageList.ListName);
SPListItemCollection result = list.GetItems(query);
SPListItem StorageItem = result[0];
xmlDoc.LoadXml(StorageItem[LocalStrings.TimeZoneStorageList.Fields.UserXML]
.ToString());
Is there anything that could cause that code to throw an AccessDeniedException while the user is able to access the list through the UI?
Alternatively, is it possible for SharePoint to report a list as the source of the error when the permissions issue is actually somewhere else entirely?
The List ID in the query string on AccessDenied.aspx can in fact be unrelated to the actual error.
The relevant code was something like
If CatchAccessDeniedException is not disabled, SharePoint will see the exception despite the catch and abort the thread. Since this is controlled on another thread, it’s not synchronous and the code continues to run long enough that the thread aborts in the middle of accessing the list.
Both parts of the error message are technically correct – There was an AccessDeniedException, and the last operation was trying to open the list – but there is no actual connection between the two.
The actual problem turned out to be service account permissions on mysites, which naturally never appeared in any logs or error messages.