Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm

When I tried to deploy a SharePoint Solution, I got the following error:

An error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Error occurred in deployment step 'Recycle IIS Application Pool': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Cause

The root cause of this issue might be one of the following:
  1. The Visual Studio is not running as Administrator.
  2. The current user is not a site collection Administrator.
  3. The SQL Server service is not running.
  4. The SharePoint web application pool is stopped.
  5. The SharePoint web application pool Account is locked.
  6. The current user (the user used to run visual studio and deploy your solution) didn’t have ‘db-owner’ role on
    • Content Database.
    • SharePoint_Admin.
    • SharePoint Config database.
  7. The SharePoint web application pool account didn’t have the following role:
    • db-owner‘ and ‘SP_DATA_ACCESS’ on Content Database.
    • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint_Admin.
    • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint Config database.

Solution:

The Visual Studio is not running as Administrator.

Try to run  VS as administrator,

Open Visual Studio as Administrator

Also, Check, Visual Studio requires the application to have elevated permissions.


The current user is not a site collection Administrator.

Make sure that the current user that run the visual studio is a site collection administrator.

Site collection administrator


SQL Server service is not running

Make sure that the SQL Server service is up and running properly.
SQL Server Service Failed to Start
For more details check Unable to start SQL Server service

The SharePoint web application pool Account is locked.

Make sure that the SharePoint web application pool Account is unlocked in AD.

unlock user account in AD


Application Pool is stopped

Try to restart the application pool of your SharePoint web application, if it is not started properly that means the credential of the current application pool identity has been changed and not reflected to the IIS.
Set Application Pool Identity
  • Open IIS Manager
  • Select the application pool of your web application
  • Click advanced settings
  • Under identity click to reset the application pool account
  • Click set to update the username and password of your account
  • Restart Application pol that should be now started properly
Change the identity Application pool in IIS

The required database permission to deploy a SharePoint Solution

To deploy the solution successfully, you need to map the currently logged-in user as db_owner into the below three databases.
  • SharePoint_Config
  • SharePoint_Admin_[GUID]
  • All Content Databases of your web application that you need to deploy your solution.

content database permissions to deploy SharePoint Solution


The required database permission for the SharePoint Application Pool Account

The SharePoint Application Pool account should have the below database permission

  • db-owner‘ and ‘SP_DATA_ACCESS on all web application Content Databases.

Configuration database permissions for SharePoint Application Pool

  • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint Config database.
  • WSS_CONTENT_APPLICATION_POOLS‘ on SharePoint_Admin.

content database permissions for SharePoint Application Pool


The Active Directory permission for the SharePoint Application Pool Account

Make sure that the application pool account is a member of WSS_WPG.

the application pool account is a member of WSS_WPG


Applies To
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
Advertisements

5 thoughts on “Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm

  1. Hello Mohammed,

    I got the same problem, i have changed the users mapping as db_owner into the 3 databases but the problem is still there !!!!
    any advice !!!

    thx

    Like

  2. In my case SQL Server service was not started, I start it and deploy the webpart project in vs 2010 again, it works

    Like

  3. you’re in point of fact a just right webmaster.
    The website loading velocity is incredible. It kind of feels that you’re doing any unique trick.
    Also, The contents are masterwork. you have done a excellent task on
    this topic!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s