If you working on a SharePoint 2013 Visual Studio 2012 project. And after you have created a Visual web part then you tried to deploy to SharePoint Site collection. May you got the following error:
Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: http://servername/. Make sure that this is a valid URL and 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.
- First you should open the web site and check wither it is opening in the browser or not. If it’s not work then you should check the SharePoint servers are running.
- Second, If the web site is open successfully then you should Restart visual studio.
- Finally, if the site is open successfully and you had Restarted visual studio. then you should check if the current user on the web content database is owner. If not then add the current user to the web content database with owner role.