title: msdeploy cannot reach destination despite having web deployment service started
body: <p>as you can see from the title I am experiencing some trouble deploying to a remote IIS.
  Here is what I have done so far:</p>
  
  <ul>
  <li>I have set up a virtual machine running an IIS7 on Windows Server 2008.</li>
  <li>I have bridged the VMs network adapter.</li>
  <li>I have installed and started the "Web Deployment Agent Service" as well as the "Web Management Service".</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/WO79n.png" alt="&quot;Web Deployment Agent Service&quot; and &quot;Web Management Service&quot; started and running"></p>
  
  <ul>
  <li>I also created a new IIS manager user and granted him access to the website in question.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/daw9u.png" alt="both local Administrator and iisman have access to the site I want to deploy to"></p>
  
  <p>Now deploying itself works when I do it like this for example:</p>
  
  <pre><code>msbuild D:\Path\ToProject\DeployVariation01\DeployVariation01.csproj
          /p:Configuration=Debug;
          Platform=AnyCpu;
          DeployOnBuild=true;
          DeployTarget=MSDeployPublish;
          MSDeployServiceURL="Some.IP.-.Address";
          DeployIisAppPath="DeployAppDebug/DeployThis";
          MSDeployPublishMethod=WMSVC;
          AllowUntrustedCertificate=true;
          Username=Administrator;
          password=&lt;thinkOfAPassword&gt;
  </code></pre>
  
  <p>Then the application is deployed and I can call it from my browser.</p>
  
  <p>UPDATE: It also works with this command, so that should answer James Woolfenden's question of whether I have access to the msdeploy webservice:</p>
  
  <pre><code>msbuild D:\Path\ToProject\DeployVariation01\DeployVariation01.csproj
          /p:Configuration=Debug;
          Platform=AnyCpu;
          DeployOnBuild=true;
          DeployTarget=MSDeployPublish;
          MSDeployServiceURL="https://some.ip.-.address:8172/MsDeploy.axd;
          DeployIisAppPath="DeployAppDebug/DeployThis";
          MSDeployPublishMethod=WMSVC;
          AllowUntrustedCertificate=true;
          Username=Administrator;
          password=&lt;thinkOfAPassword&gt;
  </code></pre>
  
  <p>But, I want to use the <a href="http://sedodream.com/2011/12/24/PackageOncePublishAnywhere.aspx" rel="nofollow noreferrer">PackageWeb-Approach</a> (also described <a href="http://www.youtube.com/watch?v=-LvUJFI8CzM" rel="nofollow noreferrer">here</a>).<br>
  So I create a WebDeploy-Package from Visual Studio 2012, which I want to deploy.
  Deploying this generally seems to be no problem, too, since I get it to run on my local computer.</p>
  
  <p>Both, my local IIS as well as the one in my VM have the same WebSite-Structure, so I just should have to change "Computer name", "Username" and "Password" when calling the Publish-Interactive.ps1-script in order to get it to work, but when I do that I keep getting the error message</p>
  
  <pre><code>Could not connect to the remote computer ("Some.IP.-.Address")
  On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
  </code></pre>
  
  <p>But that confuses me, because I actually have Web Deploy installed via WebPlatformInstaller and the Web Management Service is running.
  I also tried to ping my VM from my host machine and it is getting through.
  For testing purposes I switched off the firewall in my VM entirely, too.</p>
  
  <p><img src="https://i.stack.imgur.com/nBqiN.png" alt="All firewall profiles are switched off"></p>
  
  <p>But still I get the same error message.</p>
  
  <p>Can anyone guide me towards the right direction? What am I missing?</p>