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.


I am getting the above error, when I am  trying to deploy the web part through visual studio. The reason is the current logged-in user may not be the "db owner" in the content databases.

Solution:
To deploy the solution successfully, you need to map the current logged-in user as db_owner into the 3 databases.
1. SharePoint_Config
2. SharePoint_Admin_[GUID]
3. Your current web application that needs to deploy the Web part
To do the above open sql server.
Go to security -> Logins. Choose the user name.
Right click on it  -> Go to properties  -> click on User Mapping .

See the below image for details.


Comments