We help IT Professionals succeed at work.

TFS 2013 Web Deploy failing; The Web Management Service service terminated with service-specific error %%-2147483640.

We've been able to successfully, automatically, deploy our MVC and WebApi to IIS7.5 on Win2008 R2, for some time now.  Just this week the MSDeploy stopped working.  The System event log shows this error when attempting to restart the Web Management Service on the targeted Win200 R2 server:
The Web Management Service service terminated with service-specific error %%-2147483640.

The Application log shows this error at the same exact time the above error occurs.

Failed to activate the Hostable Web Core (HWC). Web Management Service startup failed.  Please reference the Win32 error in this event for further information.

Exception:System.Runtime.InteropServices.COMException (0x8007007F): The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.Web.Management.Server.WebServer.Microsoft.Web.Management.Server.Interop.IWebServer.Start()


The above error is preceded by this warning:
A listener channel for protocol 'http' in worker process '7164' serving application pool 'WMSvcAppPool' reported a listener channel failure.  The data field contains the error number.

Which is preceded by this error:
Failed to find the RegisterModule entrypoint in the module DLL C:\Windows\Microsoft.NET\Framework64\v4.0.30319\webengine.dll.  The data is the error.

we've attempted to reach the target server using https://ourservername:8172/MsDeploy.axd.  The response is Error 102 (net::ERR_CONNECTION_REFUSED): The server refused the connection.  Is this occurring because the port is blocked or because the Web Management Service is not running?  (The Windows Firewall with Advnaced Secrity dialog says the "Windows Firewall is off" and there are no entries in the firewall log (C:\Windows\System32\LogFiles\Firewall).

We've seen some posts that indicate the certificate may be the issue. Not sure how to actually tell if this is the case though. The CERT we have says it is valid thru 2029.

Thanks for any assistance.
Watch Question

What changed this week? Windows updates maybe? You could try backing them out or even use a restore point from last week to see if it fixes the problem.  

Naturally you will want a backup before you restore if you try that route.
Most Valuable Expert 2012
Top Expert 2008
It might be possible that incorrect assemblies are being loaded from unexpected locations, like the System32 folder.  Windows Update can install things that mess up previously running processes.


Thanks for the responses.

At the moment we're suspecting that one or more Windows Updates may be the cause.  We re-pointed our MSBuild at a similar server (Win2008 R2) that had not received the 4/18 set of updates, and the deployment was succcessful.

Our next step for the non-working target machine is to back out of the updates one at a time and then re-starting the Web Deployment Service, (Then, of course,  re-add each one to confirm)

We'll update this thread when we find outwhich one might be causing our issue.

Seth SimmonsSr. Systems Administrator

I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.


Just a followup:
We're assuming the issue was Windows updates. Our VM admin decided to simplay repalce the VM, and we did not get a chance to explicity roll back the updates one-by-one.