Error occurred in deployment step 'Recycle IIS Application Pool': Invalid namespace
-
16-10-2019 - |
Question
I am trying to test developing for SharePoint 2010 on a Windows 7 machine.
I created a new empty SharePoint project, added a web part and deployed, which worked fine.
When I try to run or deploy a second time I get the above error message.
Anyone know how to fix this problem?
Solution
Apparently, VS 2010 uses WMI to control IIS during a redeploy. Without the features enabled, I got the same "Invalid namespace" error.
The solution was to: open the Turn Windows Features on or off menu in the Control Panel (under Programs), and enable WMI compatibility. The path to the feature is:
Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS 6 WMI Compatibility
OTHER TIPS
Had the same issue on a Windows Vista x64 environment with Visual Studio 2010 RTM and SharePoint Foundation 2010 RTM.
Need to start the SharePoint Administration service (set to manual startup by default).
Go to:
- Start
- Run
- Services.msc
- SharePoint 2010 Administration
- Right click -> Start
This solved the issue for me.
Usually this problem comes when the server is too busy and not getting enough time to retract the Solution package file. What RaM are you using? Try to close all other application and deploy. If you still have problems let me know. I have solved the problem the same way.