IIS has several features such as WebSocket Protocol, Tracing or Request Monitor that you can install when you need these additional capabilities. You can install them by using Server Manager (That where I run into 0x800f0922 error).
I came across to the error message below in Event Viewer while trying to install Request Monitor in a freshly installed Windows Server 2016
Update IIS-RequestMonitor of package IIS-WebServer-Core-Package failed to be turned on. Status: 0x800f0922
Server Manager displayed this error:
The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. Error: 0x800f0922
We also tried installation it via PowerShell. Here is the result:
Enable-WindowsOptionalFeature: Enable-WindowsOptionalFeature failed. Error code = 0x800f0922 at line: 1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName IIS-RequestMonitor
+ CategoryInfo: NotSpecified: [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId: Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand
Troubleshooting of the failed feature installation
Collect and analyze the following logs to get troubleshooting started:
- CBS logs (C:\Windows\Logs\CBS)
- DISM logs (C:\Windows\Logs\DISM)
- ApplicationHost.config file (C:\Windows\System32\inetsrv\config)
- The output of
Dism /Online /Cleanup-Image /ScanHealth
command
- Procmon logs (Use Process Monitor tool)
The answers to the questions below also help narrowing the issue down:
- Are you able to install Request Monitor by logging in with another user?
- Are you able to install Request Monitor in another server?
- Are there other roles apart from IIS installed in the server?
- Make sure there is enough space in the disks (Right click on Start menu icon > Computer Management > Disk Management)
- If not installed yet, install .NET Framework and try again (Reference)
In my case, CBS logs showed “Process”
CSI 00000034 Calling generic command executable (sequence 3): ‘C:\Windows\System32\inetsrv\iissetup.exe’
CmdLine: ‘”C:\Windows\System32\inetsrv\iissetup.exe” /launch C:\Windows\System32\inetsrv\appcmd.exe install module -name:RequestMonitorModule -image:C:\Windows\System32\inetsrv\iisreqs.dll -add:false -lock:true’
CSI 00000035 Performing 1 operations as follows: (0) LockComponentPath: flags: 0 comp: {l:16 b:f1be012b658ed5015e0000007c205818} pathid: {l:16 b:f1be012b658ed5015f0000007c205818} path: [l:115]’\SystemRoot\WinSxS\x86_microsoft.windows.s..ation.badcomponents_31bf3856ad364e35_10.0.14393.0_none_09e78f632173f4c5′ pid: 207c starttime: 132168329134154628
CSI 00000038@2019/10/29:14:28:44.182 Beginning NT transaction commit…
CSI 00000039@2019/10/29:14:28:44.363 CSI perf trace:CSIPERF:TXCOMMIT;194557
CSI 0000003a (F) Done with generic command 3; CreateProcess returned 0, CPAW returned S_OK Process exit code 13 resulted in success? FALSE Process output: [l:22 [22′[gle=0x80004005]
Error [0x018007] CSI 0000003b (F) Failed execution of queue item Installer: Generic Command ({81a34a10-4256-436a-89d6-794b97ca407c}) with HRESULT HRESULT_FROM_WIN32(14109). Failure will not be ignored: A rollback will be initiated after all the operations in the installer queue are completed; installer is reliable[gle=0x80004005]
More importantly, Procmon logs showed PARSE_ERROR_INFO
while reading applicationHost.config file which points out an issue with this file.
641 2:08:09.7690809 PM appcmd.exe 10992 1052 ReadFile C:\Windows\System32\inetsrv\config\applicationHost.config SUCCESS Offset: 0, Length: 63,692, Priority: Normal
8 KernelBase.dll ReadFile + 0x74
9 nativerd.dll CONFIG_XML_DOM::ParseXmlFile + 0xac
10 nativerd.dll CONFIG_FILE::ParseConfigFile + 0x148
642 2:08:09.7692157 PM appcmd.exe 10992 1052 CreateFile C:\Windows\System32\inetsrv\en-US\iisres.dll.mui SUCCESS Desired Access: Generic Read, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Delete, AllocationSize: n/a, OpenResult: Opened
17 nativerd.dll AdminFormatMessage + 0x4c
18 nativerd.dll PARSE_ERROR_INFO::SetErrorInfo + 0x2d
19 nativerd.dll CONFIG_XML_DOM::GenerateDom + 0x10939
20 nativerd.dll CONFIG_XML_DOM::ParseXmlFile + 0xbf
Solution for 0x800f0922 error
As the Procmon logs point out a parsing issue while trying to read applicationHost.config file, we tried to open this file. As expected, it was corrupted:
We didn’t have a backup of this file so we reinstalled IIS. This fixed the issue. We successfully installed Request Monitor feature after reinstalling IIS.
Once you have your IIS up and running, it may fail when you try to reset IIS. Check this post out for more details: Restart attempt failed. The IIS Admin Service or the World Wide Web Publishing Service, or a service dependent on them failed to start