Error occurred in deployment step ‘Recycle IIS Application Pool’: Provider load failure


Background : Today I was trying to deploy a SharePoint solution on SharePoint 2016 using Visual Studio 2017 and got below error:

Error occurred in deployment step 'Recycle IIS Application Pool': Provider load failure

Cause: In my case IIS 6 WMI Compatibility components are missing/not installed on the server. My server version is Windows Server 2016 Standard.

Solution:

  1. Go to Start button > Server Manager > Manage > Add Roles and Features > Next > Web Server (IIS) > Expand the Management Tools > Check the box of IIS 6 WMI Compatibility > Next > Install.

    Install IIS 6 WMI Component

    Install IIS 6 WMI Compatibility

  2. Reset the IIS by using iisreset command.
  3. Deploy the solution again.

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.