Office Online Server processes on Windows Server 2022 crashes with .NET Runtime error

Rafael 20 Reputation points
2023-12-18T14:47:18.6566667+00:00

Hi,

I try to run an Office Online Server on a new Windows Server 2022.

I did the installation according to the instructions on https://learn.microsoft.com/en-US/officeonlineserver/deploy-office-online-server and the whole installation went without erros. I also installed the newest patch KB5002470, so it should run on a Server 2022.

The creation of the farm with PowerShell also worked without errors and I can access the discovery URL.

But the command Get-OfficeWebAppsMachine returns, that the machine is not part of a farm. And it is not possible to access any Office service on this server. They all return a Server Error.
In the Event Log all processes of the Office Online Server are crashing with the same .NET Runtime error (see below).

The exact same installation on a Windows Server 2016 is working fine.

What is the problem on the Windows Server 2022? Am I missing something?

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Collections.Generic.KeyNotFoundException
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Item(System.__Canon)
   at Microsoft.Office.Web.Apps.Environment.WacServer.WSServiceInstanceFinderAdapter..ctor()

Exception Info: System.Reflection.TargetInvocationException
   at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
   at System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   at System.Activator.CreateInstance(System.Type, Boolean)
   at Microsoft.Office.ServiceInfrastructure.Runtime.EnvironmentAdapters.HostEnvironment.LoadAdapterInstance(Microsoft.Office.ServiceInfrastructure.Runtime.EnvironmentAdapters.AdapterLoadInformation, Boolean)
   at Microsoft.Office.ServiceInfrastructure.Runtime.EnvironmentAdapters.AdapterLoadInformation`1+<>c__DisplayClass5_0[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<BuildInstance>b__0()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
   at Microsoft.Office.Web.Common.ServiceInstanceFinder.RefreshList(System.Object)

Exception Info: Microsoft.Office.Web.Common.OfficeServiceException
   at Microsoft.Office.Web.Common.ServiceInstanceFinder.RefreshList(System.Object)
   at Microsoft.Office.Web.Common.ServiceInstanceFinder..cctor()

Exception Info: System.TypeInitializationException
   at Microsoft.Office.Web.Common.ServiceInstanceFinder.get_MachineCluster()
   at Microsoft.Office.Excel.Server.ServiceHost.ServiceHost..ctor(Microsoft.Office.Web.Common.AppEnvironment, Boolean, Microsoft.Office.Web.Common.IServiceInstanceFinder, Boolean)
   at Microsoft.Office.Excel.Server.ServiceHost.ServiceHost..ctor()

Exception Info: System.Reflection.TargetInvocationException
   at System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
   at System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   at System.Activator.CreateInstance(System.Type, Boolean)
   at System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[], System.Threading.StackCrawlMark ByRef)
   at System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[])
   at System.Reflection.Assembly.CreateInstance(System.String, Boolean, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[])
   at Microsoft.Office.Excel.Server.Host.ExcelServerHost.CreateHost(System.String, System.String)
   at Microsoft.Office.Excel.Server.LazyStartupProperty`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Initialize()
   at Microsoft.Office.Excel.Server.LazyStartupProperty`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
   at Microsoft.Office.Excel.Server.ExcelServerSettings+<>c.<.cctor>b__556_0()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
   at Microsoft.Office.Excel.Server.ExcelServerSettings.get_MinTimeBetweenTwoEcsServiceRestartsFromWatchdogInMinutes()
   at Microsoft.Office.Excel.Server.EcsWatchdog.EcsWatchdogApp.Main()

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
662 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.