Skip to main content

Web Deploy - WDeployConfigWriter issue

At one of my customers, we are still (happily) using Microsoft Web Deploy to deploy our web applications to IIS. This works great and is all nicely automated and integrated in our Azure DevOps pipelines. Until the moment it no longer works.

Something that happened last month when trying to deploy one of our projects. A look at the web deploy logs showed us the following error message:

Web deployment task failed. ((2/11/2024 15:00:08) An error occurred when the request was processed on the remote computer.)(2/11/2024 15:00:08) An error occurred when the request was processed on the remote computer.Unable to perform the operation. Please contact your server administrator to check authorization and delegation settings.

Time to contact the server administrator... Unfortunately that’s my team in this case. So let’s investigate.

We logged in on the web server and checked the event logs. There we got some extra details:

A tracing deployment agent exception occurred that was propagated to the client. Request ID '13303b1c-00df-4ed1-bc66-5cc6e93048a5'. Request Timestamp: '2/11/2024 6:10:50'. Error Details:
Microsoft.Web.Delegation.DeploymentAuthorizationException: Not able to log on the user '.\WDeployConfigWriter'. ---> System.Runtime.InteropServices.COMException: The user name or password is incorrect. (Exception from HRESULT: 0x8007052E)

And if we checked the security logs, we got the following details:

The computer attempted to validate the credentials for an account.

Authentication Package:              MICROSOFT_AUTHENTICATION_PACKAGE_V1_0

Logon Account:    WDeployConfigWriter

Source Workstation:           SERVERX

Error Code:          0xC000006A

An account failed to log on.

Subject:

              Security ID:                        LOCAL SERVICE

              Account Name:                  LOCAL SERVICE

              Account Domain:               NT AUTHORITY

              Logon ID:                           0x3E5

Logon Type:                                    8

Account For Which Logon Failed:

              Security ID:                        NULL SID

              Account Name:                  WDeployConfigWriter

              Account Domain:               BRUSRV181

Failure Information:

              Failure Reason:                  Unknown user name or bad password.

              Status:                               0xC000006D

              Sub Status:                        0xC000006A

Process Information:

              Caller Process ID:  0x10a0

              Caller Process Name:              C:\Windows\System32\inetsrv\WMSvc.exe

Network Information:

              Workstation Name:            SERVERX

              Source Network Address:   -

              Source Port:                       -

Detailed Authentication Information:

              Logon Process:                   Advapi

              Authentication Package:     Negotiate

              Transited Services:             -

              Package Name (NTLM only):            -

              Key Length:                       0

 

To explain what is going on, you first need to understand a little bit how Web Deploy works. When you install the Web Deploy extension on your IIS web server, 2 local accounts are created:

  • WDeployConfigWriter, which has Write permissions to the IIS server’s applicationHost.config. This is used by delegation rules for createApp, appPoolNetFx and appPoolPipelineMode.
  • WDeployAdmin, which is an administrator. This is used by delegation rules for recycleApp.

Normally you don’t need to know and manage these accounts as there are only used locally on the web server instance. Unfortunately due to an unknown reason the WDeployConfigWriter account no longer works.

To fix it I first did a password reset:

  • Go to Computer Management –> Local Users and Groups –> Users.
  • Right click on the WDeployConfigWriter account and choose Set Password;

 




After doing that I also updated the password in the Management Delegation UI as described in this (old) post:

  • Go to IIS
  • Click on Management Service Delegation in the Management section

 

  • There are 3 rules where the WDeployConfigWriter account is assigned to

 

  • Right click on the backupSettings rule and choose Edit…
  • On the Edit Rule screen click on Set… next to the credentials

  • Reenter the name and the (new) password

  • Repeat the steps above for the 2 other rules

That should do the trick…

More information

WDeployConfigWriter Account Issues - Trouble Shooting Web Deploy 2.0 With Lessons Learned - Working Hard In ITWorking Hard In IT

Microsoft Web Deployment Team Blog - Announcing Web Deploy 2.0 Refresh!

Popular posts from this blog

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Cleaner switch expressions with pattern matching in C#

Ever find yourself mapping multiple string values to the same result? Being a C# developer for a long time, I sometimes forget that the C# has evolved so I still dare to chain case labels or reach for a dictionary. Of course with pattern matching this is no longer necessary. With pattern matching, you can express things inline, declaratively, and with zero repetition. A small example I was working on a small script that should invoke different actions depending on the environment. As our developers were using different variations for the same environment e.g.  "tst" alongside "test" , "prd" alongside "prod" .  We asked to streamline this a long time ago, but as these things happen, we still see variations in the wild. This brought me to the following code that is a perfect example for pattern matching: The or keyword here is a logical pattern combinator , not a boolean operator. It matches if either of the specified pattern...