Sunday, February 5, 2023

"IIS Web App Manage" Step on TFS Build/Release Server

When trying to deploy to an IIS server from a TFS Build/Release Server, I ran into an error at the step for "IIS Web App Manage". The error code was 0x80090016, and the message was "Failed to commit configuration changes". "Keyset does not exist".

I googled for these errors online. All I found was that the machine keys in the folder "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" were corrupted, and needed to be re-created with "iissetup.exe /install SharedLibraries". 

BTW, the error code  0x80090016 means "Your computer's Trusted Platform Module has malfunctioned".

Well, I tried to run "iissetup.exe /install SharedLibraries" to fix the problem after backing up the affected files. But that did not work for me. In fact, I was getting "0x80070005" error after running "iissetup.exe /install SharedLibraries" even though new key files were generated.

It turned out that in my case, the key files were not the problem. The problem was that my VSTS Agent service was running in a domain user account that did not have administrator access. Once I granted the user administrator access, the TFS Release Server was able to complete the step just fine.