Over the last few weeks I came across one problem multiple times. When you tried to edit a Wiki Page in SharePoint 2010 you got the error Sys.WebForms.PageRequestManagerServerErrorException: An unexpected error occured. This was quite wired, as the users had "full contol" of the wiki.
So, first we look at the ULS logs at the time when the error occured:
01/18/2011 08:23:58.78 w3wp.exe (0x130C) 0x1F04 Web Content Management Publishing 7fz3 Medium Setting [Display] as the FormContext.FormMode for the current page d3bba74c-33f8-4659-908a-f37d2bf70a14
01/18/2011 08:23:58.80 w3wp.exe (0x130C) 0x1F04 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070005 d3bba74c-33f8-4659-908a-f37d2bf70a14
01/18/2011 08:23:58.80 w3wp.exe (0x130C) 0x1F04 SharePoint Foundation Runtime test04 Unexpected System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, Boolean bPrefetchRelatedFields, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount) at Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName) at Microsoft.SharePoint.SPListCollection.Undirty() at Microsoft.SharePoint.SPBaseCollection.GetEnumerator() at Microsoft.SharePoint.SPWeb.GetCatalog(SPListTemplateType typeCata... d3bba74c-33f8-4659-908a-f37d2bf70a14
01/18/2011 08:23:58.80* w3wp.exe (0x130C) 0x1F04 SharePoint Foundation Runtime test04 Unexpected ...log) at Microsoft.SharePoint.Publishing.WebControls.MediaWebPart.get_WebPartAdderId() at Microsoft.SharePoint.Publishing.WebControls.InsertMediaRibbonButton.RegisterRequiredScripts() at Microsoft.SharePoint.Publishing.WebControls.InsertMediaRibbonButton.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) d3bba74c-33f8-4659-908a-f37d2bf70a14
Note the two lines in bold here.
Unknown SPRequest error occurred. More information: 0x80070005 <- This error message tells us that there is some problem with security.
System.UnauthorizedAccessException: Access is denied. <- That one is more specific, it tells us quite bluntly that we get an access denied somewhere.
So, the first thing is to take a look at the groups. I noticed that the SharePoint Group Style Ressource Readers might be the culprint. This group is an OOTB SharePoint group that comes with the publishing feature. Out of the box, the AD group DOMAIN\Authenticated Users is a member of that group. In that case it wasn't. So I added all authenticated users and all was fine.
NOTE: In some cases it might be required to add the users that have the Wiki Problem to Style Ressource Readers manually. Haven't had the time to go after that tough, just keep it in your mind if you need it.
ANOTHER NOTE: A customer once accidentially deleted the Style Ressource Readers Group. Deleting SharePoint OOTB groups is never a good idea. He recreated the group (just manually added a new group) but it didn't work as expected. If you have to recreate Style Ressource Readers also check the following settings:
The group has to be given read permissions to the Master Page Gallery and the Style Library. This is done under Site Actions > Manage Content and Structure > (Master Page Gallery) Edit Properties > Permissions for the document library > New
I hope this short article helped you solve your problem. Cheers SJ