Recently we were developing a web-part for our SharePoint 2013 site. When we tried to connect to SharePoint 2013 site from Visual Studio 2013, we got following error -
Error occurred in deployment step ‘Recycle IIS Application Pool’: Cannot connect to the SharePoint site: http://<your sharepoint site>/. Make sure that this is a valid URL the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project
Due to this error, we were not able to deploy web-part to SharePoint site directly from Visual Studio itself. We were also not able to debug the web-part.
Finally we found the solution for this problem. Visual studio 2013 runs as process vssphost5.exe. This process runs under an account. This account can be identified by going to Task Manager and looking at details of the process. This account needs to be given dbowner permissions on following SharePoint databases -
Error occurred in deployment step ‘Recycle IIS Application Pool’: Cannot connect to the SharePoint site: http://<your sharepoint site>/. Make sure that this is a valid URL the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project
Due to this error, we were not able to deploy web-part to SharePoint site directly from Visual Studio itself. We were also not able to debug the web-part.
Finally we found the solution for this problem. Visual studio 2013 runs as process vssphost5.exe. This process runs under an account. This account can be identified by going to Task Manager and looking at details of the process. This account needs to be given dbowner permissions on following SharePoint databases -
- SharePoint site content database
- SharePoint central admin content database
- SharePoint configuration database
To find names of these databases, you can go to Central Admin --> Backup & Restore -->Perform Backup.
Once these permissions were given, we were able to deploy the web-part and debug it right from Visual Studio.
No comments:
Post a Comment