Access denied Microsoft.SharePoint.SPGlobal

Jun 25, 2009 at 6:56 PM

I run the ImpEx.exe locally on my MOSS server.  It detects my Sharepoint Site Collection.  When I try to browse my Port 80 sharepoint site I'm getting the following error.  I am Administrator of the Site, of the Admin Console as well as the MOSS Server.  The application pool runs with Network Services.

System.UnauthorizedAccessException: Access Denied. (Exception de HRESULT : 0x80070005 (E_ACCESSDENIED))
   à Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
   à Microsoft.SharePoint.Library.SPRequest.GetSubwebs(String bstrUrl, Object& pvarSubwebs, Object& pvarSubwebIds, Object& pvarLangs, Object& pvarTitles)
   à Microsoft.SharePoint.SPWeb.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts)
   à Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
   à Microsoft.SharePoint.SPWebCollection.get_Count()
   à ImpEx.GUI.MainForm.WebAppList_BeforeExpand(Object sender, TreeViewCancelEventArgs e)
   à System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
   à System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
   à System.Windows.Forms.TreeView.WmNotify(Message& m)
   à System.Windows.Forms.TreeView.WndProc(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Jun 25, 2009 at 8:11 PM

Perhaps on a some web,  you don't have access rights, even though you have the right as the administrator of the collection sites.
These rights may not be enough, as they may be overridden by the rights to any specific site.

Try to run under the system account, if you know this account.


or at Central Administration give yourself rights as Farm administrator - in order to have full access to all webs of the sites collection

Sep 3, 2009 at 1:13 PM

Same kind of exception for me:

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
   at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
   at Microsoft.SharePoint.Library.SPRequest.GetAllWebsOfSite(String bstrUrl, Object& pvarWebs, Object& pvarWebIds, Object& pvarParentWebs, Object& pvarLangs, Object& pvarTitles)
   at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.GetWebsData(String[]& strNames, String[]& strServiceRelUrls, Guid[]& guidWebIds, Int32[]& nLanguages, String[]& strTitles, String[]& strDescriptions, String[]& strCreationTimes, String[]& strModifiedTimes, Boolean[]& bUserIsWebAdmins, Int32[]& nWebTemplates, Int16[]& nProvisionConfigs, Int16[]& nMeetingCounts)
   at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()
   at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
   at ImpEx.GUI.MainForm.WebAppList_BeforeExpand(Object sender, TreeViewCancelEventArgs e)
   at System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
   at System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I'm 100% sure, i'm a farm administrator.

Sep 3, 2009 at 2:01 PM

sorry for my post... i didn't read the reply correct: i tried running as the service account and it works ok