Error occurred in deployment step ‘Recycle IIS Application Pool’: Remote SharePoint site connections are not supported


Problem/Error:

I have a SharePoint 2016 On-premises farm. I got bellow error while I am deploying a SharePoint 2016 solution with Visual Studio 2017

Error occurred in deployment step ‘Recycle IIS Application Pool’: Remote SharePoint site connections are not supported

Solution:

  • Edit the hosts file located at ‘C:\Windows\System32\drivers\etc’ folder
  • Place site collections URL pointing at 127.0.0.1    Lets say my SharePoint site collection URL is http://spportal.abc.com

  • Save and Close. Then retry to deploy again.