In this post, we’ll fix “The local SharePoint server is not available in Visual Studio 2017 / 2015 /2013“
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.
You might also like to read This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database
-
1
The local SharePoint server is not available Check that the server is running and connected
-
1.1
[Solved] The local SharePoint server is not available Visual Studio 2017 / 2015 / 2013
- 1.1.1 Running Visual Studio as Administrator
- 1.1.2 The current user should be a site collection administrator
- 1.1.3 SQL Server service must be up and running
- 1.1.4 The SharePoint web application pool account should be unlocked
- 1.1.5 The SharePoint Application Pool is started
- 1.1.6 Database permission required to deploy SharePoint Solution
- 1.1.7 Database permission required for SharePoint Application Pool Account
- 1.1.8 Active Directory permission required for SharePoint Application Pool Account
-
1.1
[Solved] The local SharePoint server is not available Visual Studio 2017 / 2015 / 2013
The root cause of this issue might be one of the following:
- The Visual Studio is not running as Administrator.
- The current user is not a site collection administrator.
- The SQL Server service is not running.
- The SharePoint web application pool is stopped.
- The SharePoint web application pool account is locked.
- 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.
- 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.
Running Visual Studio as Administrator
If you didn’t run Visual Studio as an administrator, you may get “The local SharePoint server is not available” error.
An error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available
Therefore, you should run Visual Studio as an Administrator as mentioned below:
You may be also like to read Visual Studio requires the application to have elevated permissions.
The current user should be a site collection administrator
Make sure that the current user that runs the Visual Studio is a site collection administrator.
- Open your SharePoint site.
- Go to site settings.
- Below “Users and Permissions“, click on “Site Collection Administrators“.
- If the current user is not added at “Site Collection Administrators“, try to add it.
SQL Server service must be up and running
Make sure that the SQL Server service is up and running properly.
- Open “Services”.
- Search for “SQL Server”.
- Make sure the “SQL Server” service state is running.
You may also like to read Unable to start SQL Server service
Make sure that the application pool account of the SharePoint site is unlocked in Active Directory.
Make sure that the SharePoint Application Pool is running.
- If it’s started try to restart it.
- If it is not started properly that means the credential of the current application pool identity has been changed but it’s not reflected on the IIS.
Set Application Pool Identity
- Open IIS Manager.
- Select the application pool of your web application.
- Click on “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.
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.
You might also like to read SQL Server Best Practices for SharePoint 2019.
The Application Pool account that runs SharePoint Web Application should have the below database permissions:
- ‘db-owner‘ and ‘SP_DATA_ACCESS‘ on all web application Content Databases.
- ‘WSS_CONTENT_APPLICATION_POOLS‘ on the SharePoint Config database.
- ‘WSS_CONTENT_APPLICATION_POOLS‘ on the SharePoint_Admin database.
Make sure that the application pool account is a member of WSS_WPG.
Applies To
- SharePoint 2016.
- SharePoint 2013.
Conclusion
In conclusion, we have fixed the SharePoint Deployment issue “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.“.
Additionally, we have explored the required database permission for the SharePoint Application pool account.
You may also like to read
- An error occurred in deployment step ‘Recycle IIS Application Pool’: The vssphost4.exe process was unable to start due to an unknown error or problem.
- Cannot connect to the configuration database SharePoint 2016.
- SharePoint 2019: Service Accounts Recommendations.
- Missing Office / SharePoint template in Visual Studio 2017.
- Visual Studio 2015 Missing SharePoint Templates.
- Missing SharePoint 2016 Project Template in Visual Studio 2015.
- Missing office / SharePoint Template in Visual Studio 2013.
Have a Question?
If you have any related questions, please don’t hesitate to Ask it at deBUG.to Community.
Pingback: SharePoint: 500 Internal Server Error | SPGeeks