Web Deploy no longer works
Asked Answered
H

1

18

My team uses Web Deploy in order to deploy updates to our website on to our production server. The last few days I've been doing some housekeeping and have changed my password (which I made sure to update in my Web Deploy configuration) and moved the solution for our website to a different location in TFS. I'm not sure which (if either) of these has caused the issue, but I am now no longer able to publish our website using Web Deploy.

I can preview the publish fine, but I can't actually publish it.

Preview works

The Output in Visual Studio shows this:

Start Web Deploy Publish the Application/package to https://[REDACTED]:8172/msdeploy.axd?site=[REDACTED] ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5): Error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (Could not connect to the remote computer ("[REDACTED]") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.)
Publish failed to deploy.

(Note that I've removed some identifying information from this log, which has been replaced with '[REDACTED]')

I found a page describing this issue here: http://www.iis.net/learn/publish/troubleshooting-web-deploy/troubleshooting-web-deploy-problems-with-visual-studio

It says to check in the WMSvc log to find the status and substatus codes for further troubleshooting.

Logs

Here I've colour coded lines relating to the preview in green and lines relating to the actual publish in red. As you can see, the requests returned with a 200 (OK) status, meaning the server is not aware of any error occuring. However Visual Studio reports a failure and my production website has not been updated.

The fact that log entries are generated tells me that Web Deploy is properly installed and the handler is setup correctly.

It seems the deploy always fails after ~30 seconds. This could be coincidence, but I'm wondering if there's a timeout at play.

Could anyone suggest further troubleshooting steps?

EDIT: This issue occurs when I try to publish to ANY server, so it's definitely a client issue and not a server issue.

EDIT2: I have two branches of my project, Main and Dev. I just discovered that I can still publish from Dev, just not from Main. They both have identical settings. Very weird.

Hannover answered 15/7, 2015 at 4:53 Comment(9)
I normally create a package rather than deploying directly. Have you tried comparing your publish profiles (the actual .pubxml files) between your Main and Dev branches? Perhaps you could re-create the publish profile on Main if you have not done that,Overlap
I agree with @FrankFajardo. So you can deploy locally and to your dev environment but not main?Bigener
I might be repeating with @Bigener said but are you saying you can deploy from your main branch to your local machine but not to your Production Server? Or are you saying you can publish from dev branch but not from main branch?Oraliaoralie
I have compared the .pubxml files and they are identical. I've also tried re-creating the publish profile on Main.Hannover
I can run the website locally using F5, and I can publish it to my production server from my Dev branch, but I cannot publish to my production server from my Main branch.Hannover
Can you check iis logs of the server or the publishing windows service?Euphrates
I posted WMSvc logs, not sure what more I can post.Hannover
You said you changed your password and that your pubxml files are identical between dev and main, however the password is not saved in your pubxml, did you check if your credential is correct on the main branch? I think the password is in .pubxml.user file. Please check if it is correct. Otherwise did you try to delete your publish settings on the main branch and re-create it again?Antecedent
Yeah, I re-entered my password multiple times to make sure that wasn't the problem. I also tried deleting and recreating publish settings multiple times.Hannover
K
0

This can be caused by few reasons. I've written this blogpost earlier about the issues.

When we install the Web Deploy tool, it creates local users "WDeployConfigWriter" and "WDeployAdmin". In your case, you've explicitly changed the password to reset these local users passwords I think, or, the passwords of those in charge. To reset these local users passwords, you can do following:

  1. "Control Panel -> User Accounts -> Give other users access to this computer -> Advanced -> Advanced -> Users"

    • Reset WDeployConfigWriter's password
    • Reset WDeployAdmin's password
  2. "IIS -> Server Node -> Management Service Delegation"

    • Right click on each rule with users "WDeployAdmin" and "WDeployConfigWriter"
    • Click Edit
    • Click on "Set..." button in "Run As" group
    • Enter the name of the account you are going to update the password of
    • Enter password on two areas

If the operation is still erroneous see Event Logs on Windows, they are the real deals here. Check this link.

Kataway answered 10/1, 2017 at 10:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.