I am trying to deploy SharePpoint 2010 web parts (through Debug in VS 2010) and I keep getting this error:

"Error occurred in deployment step 'Recycle IIS Application Pool': Win32: The system cannot find the path specified."

The port number of the Project Web App site url I am trying to deploy to is inconsistent - in Central Admin it has one number (let's say 99999) yet the port number column says something else (like 300). I made two web sites in IIS to reflect these two port numbers and the five-digit one is being used.

How can the path not be found? What are some likely causes? What can I do to resolve it?

2 Answers 2


Have you tried starting VS2010 as an administrator account that has permission to perform IISRESET? It could be that the user you are currently running VS2010 does not have this permission and give you this error when VS2010 is trying to reset IIS.

If Run As Administrator does not work you can use the Runas command from the CMD to start VS2010 as which ever user you need to start it as.

runas /env /user:<username>@<domain> "<Path to your application>"

I'm pretty confused about your current setup, as I do not understand why you need to create 2 web sites, and particularly why the ports are changing.

You need to:

  1. Look into SPCA and identify the Web Application + Site collection path where you plan to deploy
  2. Make sure VS solution is actually connected to it (in the project Properties window ), and for that you would need to run VS as Administrator (e.g. right-click on VS icon, "Run as Administrator") - I assume here you are running SharePoint on the same machine as the one where you try running VS.

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.