Wednesday 21 September 2016

Error occurred in deployment step ‘Activate Features’: Attempted to perform an unauthorized operation

I have created a SharePoint empty project and added visual webpart into it.
When I try to deploy the solution, ended up with below error.

"Error occurred in deployment step "Activate Features" attempted to perform an unauthorized operation"


Reason:
The account which you are trying to deploy the solution may not have permission to specific webapplication/SiteCollection.

Solution:
  • Open SharePoint 2013 Central Administration.
  • Navigate to Application Management and choose Change site collection administrations
  • Select the site collection where deployment should happen
  • Add you windows account[Account which you are trying to deploy] as the primary (or) secondary site collection administrator.

Also check account has permission to access database, if not please add into Security section of SQL Server.

Hope this helps!!!