Error occurred while loading ‘Application Name’ Web Application


While trying to load a SharePoint farm the following error messaged was displayed:

Error occurred while loading ‘Application Name’ Web Application

and the following error messages are stored in the event log:

The following sites are not loaded properly because you do not have the right privileges for these databases.
Unavailable databases:


Unavailable sites:


The user running the application needs to have the proper privileges to access the information about Site Collections stored in the content databases. See this article for more details on configuring privileges.

If you are still having issues with individual Web Applications or other items you need to do the following:
Make sure the user has Shell access to the given content database, using the following PowerShell code to grant access:

$spcdb = Get-SPContentDatabase WSS_Content_Intranet
Add-SPShellAdmin -UserName DOMAIN\User -Database $spcdb