title: Visual Studio 2015 - Publish Fails after Validate Connection passes ok
body: <p>I'm having a frustrating issue using Visual Studio 2015 web deploy. My publish action is failing on one machine, but works OK on a different machine.</p>
  
  <p>My solution is source controlled, so the code base is the same on both machines, and both build and run locally as normal. The publish profile (.pubxml) files are identical on both machines. </p>
  
  <p>When I open the publish dialog (right click on project > publish), and click 'Validate Connection' on the Connection tab I get the green tick.</p>
  
  <p><a href="https://i.stack.imgur.com/20E1F.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/20E1F.jpg" alt="Validate Connection shows success"></a></p>
  
  <p>Opening the Preview tab and clicking 'Start Preview' gives me a list of files that have changed, as expected.</p>
  
  <p>But clicking 'Publish' fails with an "ERROR_COULD_NOT_CONNECT_TO_REMOTESVC"</p>
  
  <p><a href="https://i.stack.imgur.com/IRUig.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IRUig.jpg" alt="Publish Fails"></a></p>
  
  <p>I've tried all the troubleshooting tips I can find online.. but nothing is making a difference. </p>
  
  <ul>
  <li>Stop/Start msdepsvc</li>
  <li>Stop/Start wmsvc</li>
  <li>Delete/Recreate IIS site</li>
  <li>Uninstall/Install Web Deploy</li>
  <li>Publishing to a different sub-domain</li>
  </ul>
  
  <p>The confusing part is that I can publish successfully from a different machine, using the same settings.</p>
  
  <p>What else could be causing the publish to fail, when all the settings are validating ok? Any suggestions would be very much appreciated. </p>