This project has moved. For the latest updates, please go here.

access is denied - solved

Dec 28, 2011 at 8:24 AM

Every time I hit the "find faulty feature in farm" it throws an error 

"System.UnauthorizedAccessException: Access is denied. (exception from HRESULT: 0x80070005"



Running as admin... 


Mar 15, 2012 at 4:34 PM

Attention, you also need to have owner rights on the config db and all content dbs!

Also, it is recommended, that you make yourself sitecollection admin on all sites (e.g. via policy) and as you said, get also farm administrator rights.

Different features require admin rights in different places.
The find faulty feature button goes through all of them. ;-)

Kind regards,



Mar 20, 2012 at 8:05 AM

Hi Ismailia

I'm already site collection admin and I've checked that I've dbo rights...

Running Windows Server 2008 Standard R2

getting this:

"System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))   at Microsoft.SharePoint.Library.SPRequest.GetAllWebsOfSite(String bstrUrl, Object& pvarWebs, Object& pvarWebIds, Object& pvarParentWebs, Object& pvarLangs, Object& pvarTitles, Object& pvarUIVersions, Object& pvarFlags, Object& pvarWebTemplates, Object& pvarConfigurations, Object& pvarMasterUrls, Object& pvarCustomMasterUrls)   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, Int32[]& nUIVersions, Int32[]& nFlags, String[]& strMasterUrls, String[]& strCustomMasterUrls)   at Microsoft.SharePoint.SPWebCollection.EnsureWebsData()   at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()   at FeatureAdmin.FrmMain.btnFindFaultyFeature_Click(Object sender, EventArgs e)   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ButtonBase.WndProc(Message& m)   at System.Windows.Forms.Button.WndProc(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)

************** Loaded Assemblies **************mscorlib    Assembly Version:    Win32 Version: 2.0.50727.5448 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll"

Mar 22, 2012 at 10:01 PM
Edited Mar 22, 2012 at 10:01 PM

Hm, this has to be a rights issue.

1. Please try to start featureadmin as administrator (right-click - run as administrator)

2. When exactly do you get this error message? When you try to select a sitecollection?
If yes, make sure, that you are sitecollection administrator in this site collection, that you want to select.
(Also, is rights inheritance broken in this SiteCollection? Try to browse to this sitecollection and open all subwebs in sitemanager. (but if you are sitecollection admin, you should still be able to browse all subsites (?)))

3. You are working locally on a WFE, you have local admin rights, you are farm admin and you have dbo rights to the sp_config and content db?
Then it HAS to work.

Let me know, if that helped.

Kind Regards,

Achim Ismaili

Mar 29, 2012 at 9:08 PM

I was also getting this error (popped up 3 times) when I tried to find faulty features in the farm... I was running as Administrator, using the account that installed & configured SharePoint (really should have had rights everywhere & to everything). BUT it turns out I had to add myself to the Web Application Policy (Full Control) for each of the content web apps in the farm. once I did that, no more errors!


Mar 29, 2012 at 9:51 PM

Thank you very much, Brian! I'll update the documentation on the project start page! :-D