Exchange 2016 – Security Update For Exchange Server 2016 CU22 (KB5015322) – OWA Failed After Update

Microsoft Exchange Microsoft Windows

After an update Microsoft Exchange 2016 – Security Update For Exchange Server 2016 CU22 (KB5015322), following the upgrade the following appeared:

The Exchange server appeared to operating fine, mail flow was fine, the DAG operating as expected, users who are using ActiveSync, Exchange Anywhere or EWS all appeared to have no problems.

However using OWA the following error was being shown to users.

    Outlook didn't initalize
    Couldn't find a base theme (folder name=base)

    500 error
    X-OWA-Error System.Web.Http.UnhandledException
    X-OWA-Version 15.1.2375.31

    InnerException: System.IO.DirectoryNotFoundException

Issue

Upon investigating the problematic server the following directories where found to be empty, where 15.1.2375.31 is the version number of the update just applied.

It appeared that the OWA component was not properly updated or files were missing after the upgrade.

Troubleshooting and Resolution

I tried three main things to resolve the problem these are summerised below.

Attempt 1

Firstly attempted to resolve by copying the missing files in from another Exchange Server which did successfully upgrade, into the following directories:

  • C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\15.1.2375.31
  • C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\15.1.2375.31

Then attempted an IISReset:

iisreset /restart

NOTE: This did not fix the issue.

Attempt 2

https://social.technet.microsoft.com/Forums/en-US/f84b18f0-bca9-419a-a440-4e95650e77a2/exch-2016-after-cu9-update-owa-error?forum=Exch2016SD

First, run below command to check the status of Exchange component:

Get-ServerComponentstate -Identity SERVERNAME

Check to see if anything was in a stopped or inactive state.

In our case ForwardSyncDaemon and ProvisioningRps were in “Inactive” state.

NOTE: These are the same on a server that is working, so this looks like a red herring.

So we did NOT need to run the following command to start things.

Get-ServerComponentstate -Identity WTGC-EXCH-1603A

Attempt 3

https://social.technet.microsoft.com/Forums/en-US/f84b18f0-bca9-419a-a440-4e95650e77a2/exch-2016-after-cu9-update-owa-error?forum=Exch2016SD

Open PowerShell as Administrator and run:

cd C:\Program Files\Microsoft\Exchange Server\V15\Bin

UpdateCas.ps1

Waited for the script to run, this took like 15 minutes to complete.

[PS] C:\Program Files\Microsoft\Exchange Server\v15\bin>.\UpdateCas.ps1
[13:47:29] ***********************************************
[13:47:29] * UpdateCas.ps1: 27/09/2022 13:47:29
[13:47:30] Updating OWA/ECP on server SERVERNAME
[13:47:30] Finding ClientAccess role install path on the filesystem
[13:47:30] FixUnversionedFolderAfterUpgrade: Found source versions: 15.1.2375.7 15.1.2375.28 15.1.2375.31
[13:47:30] FixUnversionedFolderAfterUpgrade: Recovering files from 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\prem\15.1.2375.7' to 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa\Current2\version' where necessary
[13:47:41] FixUnversionedFolderAfterUpgrade success
[13:47:41] Updating owin:AutomaticAppStartup binding redirect to true
[13:47:41] Updating owa handlers
[13:47:41] Web.config file already had a node for: userbootsettings.ashx
[13:47:41] Web.config file already had a node for: MeetingPollHandler.ashx
[13:47:41] Updating Microsoft.Owin binding redirect
[13:47:42] Updating Microsoft.Owin.Security binding redirect
[13:47:42] Trying to add clients common module to Web.config file
[13:47:42] Trying to add http request filtering module to Owa Web.config file
[13:47:42] Updating OWA to version 15.1.2375.31
[13:47:42] Copying files from 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\Current' to 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\15.1.2375.31'
[13:47:48] Update OWA done.
[13:47:48] Updating OWA to version 15.1.2375.31
[13:47:48] Copying files from 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\Current2\version' to 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\prem\15.1.2375.31'
[13:55:55] Update OWA done.
[13:55:55] Updating ECP to version 15.1.2375.31
[13:55:55] Copying files from 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\Current' to 'C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\15.1.2375.31'
[13:56:08] Update ECP done.
[PS] C:\Program Files\Microsoft\Exchange Server\v15\bin>

Once the script completed, it was then possible to login to OWA for user’s whose mailboxes reside on the problematic server.

Why?

As far as we could tell this failed because the OWA components didn’t seem to update correctly. Additionally this server also hung right at the very end of the update install at 70%, the WMI service was stuck in “Stopping” state, the server was restarted and after that it reported the update was successful. It is entirely possible although the update was successful, these bits were not updated properly and thus why we have the issue.

1 thought on “Exchange 2016 – Security Update For Exchange Server 2016 CU22 (KB5015322) – OWA Failed After Update

Leave a Reply

Your email address will not be published. Required fields are marked *