I am trying to build a WebPart project and I am trying to deploy the same into my SharePoint dev site which I created using the SharePoint Central Administration. But the issue which I am facing while deploying the website from Visual Studio is in the step 'Recycle Application Pool', with the below listed error message.

Error Message:

Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: 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.

I have tried the below listed options with no luck,

  • Permission check for the user account against the content database.
  • Run Visual studio using the administrator account.
  • Reset IIS and the corresponding website.

8 Answers 8


Please verify following things

  • Current logged in user is in Administrator group of SharePoint server.
  • Please try once Recycling IIS by IISRESET it worked for me in past
  • Thanks @pholpar for taking time and correcting the link. It may be updated in last edit and somehow I skipped to verify the links. Thanks again. Commented Mar 15, 2019 at 6:16

Can you check whether the site URL you see in the properties for the project reflects the binding in IIS?

  • Yes the site URL property mentioned in the project contains the URL of the website and I am able to browse the same by entering the address in browser.
    – Arvind Raj
    Commented Oct 14, 2015 at 10:10
  • Do you have a site collection created at the root of the Web app?
    – Evariste
    Commented Oct 14, 2015 at 14:11
  • yes Evariste, first created the webapplication and on top of that had created the site collection.
    – Arvind Raj
    Commented Oct 14, 2015 at 18:37

It worked for me after I mapped a new workspace in the team explorer and downloaded the code again and then tried publishing the site to a new Sharepoint site.


Try to publish solution to *.wsp file and deploy or update solution via powershell or sp command line.

After that try to deploy it from Visual Studio.

This hint was helpful for me when i had the same situation.


For me it was database permissions.

The account I was using was an administrator on the server but it didn't have access to the web applications (I was deploying to) content database or the SharePoint config database. I gave it the same access as my farm account on those 2 databases and that did the trick.


make sure that the database server is running

  • yes all the services and applications were running
    – Arvind Raj
    Commented May 31, 2018 at 2:31

You have to do only two things

1) First close the solution which you are deploying.

2) Recycling IIS by IISRESET on command prompt it worked for me.


For me the issue was that the user deploying using visual studio did not have db_owner permission on the content database for the web application. I was able to get it working after giving the permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.