9
votes

Occasionally, seemingly randomly, about once a week, I get the following error in the output window when trying to deploy or retract a SharePoint 2010 solution from visual studio 10:

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

I have seen suggestions that include:

  • iisreset
  • restart visual studio

And I personally did not get that to work; I am always forced to:

  • Restart the machine.

Any help is appreciated.

7

7 Answers

9
votes

Just restart the WMI service on the machine. Worked for me.

6
votes

This is a windows service-related issue. Either a service has been stopped, disabled due to error or is otherwise in a faulted state. If any of the following PowerShell commands fail check if any of the services have been disabled via the service manager.

restart-service sptimerv4
restart-service spusercodev4
restart-service spadminv4
restart-service TrustedInstaller
restart-service Winmgmt -force

or iisreset /noforce worked without requiring Visual Studio restart
4
votes

I have the same problem here. IISreset, restart VS2010 and restart SharePoint 2010 timer job did not help.

Restart the SharePoint 2010 User Code Host service resolved the issue for me. Try this powershell command.

restart-service SPUserCodeV4
3
votes
  1. Closing VS 2010
  2. Restart the IIS from Command Prompt.
  3. Opening the VS 2010 Solution again. Solved the issue for me.
3
votes

Well, I happened to chance upon this blog post with regards to this issue: http://sharxpoint.com/Lists/Posts/Post.aspx?ID=5

Apparently, neither of all those mentioned in this question article worked for me. I didn't wanna go to the extend of restarting my server either, so this one helped me fix my issue, surprisingly.

You simply go to your Services (or type services.msc on your CMD).

Restart the Windows Management Instrumentation (WMI).

Just in case, before I restart the service, I closed VS2010. After restarting it, I open up VS2010 and deploy and it works!

0
votes

We had the same problem, but nothing above including server restart did not solve the problem. We spent two days trying to find the solution to the problem and it was to install IIS 6 Compatibility component.

0
votes

What worked for me is:

  1. Open Control Panel
  2. Click Programs and Features
  3. Click "Turn Windows Features on Or Off"
  4. Navigate to "Internet Information Services" -> "Web Management Tools" -> "IIS 6 Management and Compatability" and make sure "ISS Metabase and IIS 6 Configuration Compatability" is checked.
  5. Click ok and it will make the necessary adjustments if it wasn't checked previously.